diff --git a/src/b_move.cpp b/src/b_move.cpp index b31e4acbe..2a3d40bcb 100644 --- a/src/b_move.cpp +++ b/src/b_move.cpp @@ -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]; diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 2926e4e8c..bd5a9cb17 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -570,8 +570,9 @@ bool P_Move (AActor *actor) return true; } - if (actor->movedir == DI_NODIR) + if (actor->movedir >= DI_NODIR) { + actor->movedir = DI_NODIR; // make sure it's valid. return false; } @@ -585,9 +586,6 @@ bool P_Move (AActor *actor) return false; } - if ((unsigned)actor->movedir >= 8) - I_Error ("Weird actor->movedir!"); - // killough 10/98: allow dogs to drop off of taller ledges sometimes. // dropoff==1 means always allow it, dropoff==2 means only up to 128 high, // and only if the target is immediately on the other side of the line.