Browse Source

♻️ Remove monsterId from RandomWalk2

pull/5106/head
Cesar Canassa 4 years ago committed by Anders Jenbo
parent
commit
800d1665be
  1. 6
      Source/monster.cpp

6
Source/monster.cpp

@ -1785,10 +1785,8 @@ bool RandomWalk(Monster &monster, Direction md)
return ok;
}
bool RandomWalk2(int monsterId, Direction md)
bool RandomWalk2(Monster &monster, Direction md)
{
auto &monster = Monsters[monsterId];
Direction mdtemp = md;
bool ok = DirOK(monster, md); // Can we continue in the same direction
@ -2802,7 +2800,7 @@ void SnakeAi(int monsterId)
}
if (!Walk(monster, md))
RandomWalk2(monsterId, monster.direction);
RandomWalk2(monster, monster.direction);
} else {
AiDelay(monster, 15 - monster.intelligence + GenerateRnd(10));
}

Loading…
Cancel
Save