- removed the fatal errors for invalid actor->movedir.

These can be silently mapped to DI_NODIR to let the engine get the actor back on track.
This commit is contained in:
Christoph Oelckers 2017-02-04 16:29:01 +01:00
commit ec15c7f4c3
2 changed files with 6 additions and 8 deletions

View file

@ -65,11 +65,11 @@ bool DBot::Move (ticcmd_t *cmd)
bool try_ok;
int good;
if (player->mo->movedir == DI_NODIR)
if (player->mo->movedir >= DI_NODIR)
{
player->mo->movedir = DI_NODIR; // make sure it's valid.
return false;
if ((unsigned)player->mo->movedir >= 8)
I_Error ("Weird bot movedir!");
}
tryx = player->mo->X() + 8*xspeed[player->mo->movedir];
tryy = player->mo->Y() + 8*yspeed[player->mo->movedir];