added locking to dragon hoards
This commit is contained in:
@ -18,15 +18,13 @@
|
||||
std::unique_ptr<enemy_base> new_dragon(RNG *rng, const position &pos,
|
||||
const position &fallback,
|
||||
const feature enabled_features,
|
||||
int which_room) {
|
||||
const position nil{0, 0};
|
||||
|
||||
if (pos != nil)
|
||||
int which_room, const position &guards) {
|
||||
if (pos != POS_NIL)
|
||||
return std::make_unique<dragon>(rng, enabled_features,
|
||||
pos, which_room);
|
||||
pos, which_room, guards);
|
||||
else
|
||||
return std::make_unique<dragon>(rng, enabled_features,
|
||||
fallback, which_room);
|
||||
fallback, which_room, guards);
|
||||
}
|
||||
|
||||
const int EXCNT = 12;
|
||||
@ -67,7 +65,7 @@ std::unique_ptr<enemy_base> new_enemy(RNG *rng, const position &pos,
|
||||
|
||||
std::unique_ptr<enemy_base> new_enemy(const race &race, const position &pos,
|
||||
const feature enabled_features,
|
||||
int which_room, RNG *rng) {
|
||||
int which_room, RNG *rng, const position &guards) {
|
||||
using std::make_unique;
|
||||
|
||||
switch (race) {
|
||||
@ -121,7 +119,7 @@ std::unique_ptr<enemy_base> new_enemy(const race &race, const position &pos,
|
||||
|
||||
case DRAGON:
|
||||
return make_unique<dragon>(rng, enabled_features,
|
||||
pos, which_room);
|
||||
pos, which_room, guards);
|
||||
|
||||
default:
|
||||
break;
|
||||
|
Reference in New Issue
Block a user