mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 20:43:15 +00:00
- 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:
parent
43d759782d
commit
ec15c7f4c3
2 changed files with 6 additions and 8 deletions
|
@ -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];
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue