- CBF_DROPOFF Fixes

- Fixed: CBF_DROPOFF didn't actually check the coordinates passed to it for dropoff height values. It only checked to see if it was stuck in lines.
This commit is contained in:
MajorCooke 2016-04-09 14:44:17 -05:00 committed by Christoph Oelckers
commit 8b8c879994
3 changed files with 17 additions and 4 deletions

View file

@ -6707,7 +6707,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckBlock)
if (flags & CBF_DROPOFF)
{
mobj->SetZ(pos.Z);
checker = P_CheckMove(mobj, pos);
checker = P_CheckMove(mobj, pos, true);
mobj->SetZ(oldpos.Z);
}
else
@ -6742,8 +6742,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckBlock)
}
//[MC] I don't know why I let myself be persuaded not to include a flag.
//If an actor is loaded with pointers, they don't really have any options to spare.
//Also, fail if a dropoff or a step is too great to pass over when checking for dropoffs.
if ((!(flags & CBF_NOACTORS) && (mobj->BlockingMobj)) || (!(flags & CBF_NOLINES) && mobj->BlockingLine != NULL))
if ((!(flags & CBF_NOACTORS) && (mobj->BlockingMobj)) || (!(flags & CBF_NOLINES) && mobj->BlockingLine != NULL) ||
((flags & CBF_DROPOFF) && !checker))
{
ACTION_RETURN_STATE(block);
}