mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 15:22:16 +00:00
- do not let P_AdjustFloorCeil use the return from P_CheckPosition if floorz is greater than ceilingz.
This can only happen if some thing gets placed somewhere it doesn't physically fit in and as a result of the floor move would be pushed into an even more invalid place. See https://forum.zdoom.org/viewtopic.php?f=2&t=56764
This commit is contained in:
parent
c7b895c8ff
commit
3b818171d5
1 changed files with 4 additions and 1 deletions
|
@ -5884,7 +5884,10 @@ bool P_AdjustFloorCeil(AActor *thing, FChangePosition *cpos)
|
|||
}
|
||||
|
||||
bool isgood = P_CheckPosition(thing, thing->Pos(), tm);
|
||||
if (!(thing->flags4 & MF4_ACTLIKEBRIDGE))
|
||||
|
||||
// This is essentially utterly broken because it even uses the return from a failed P_CheckPosition but the entire logic will break down if that isn't done.
|
||||
// However, if tm.floorz is greater than tm.ceilingz we have a real problem that needs to be dealt with exolicitly.
|
||||
if (!(thing->flags4 & MF4_ACTLIKEBRIDGE) && tm.floorz <= tm.ceilingz)
|
||||
{
|
||||
thing->floorz = tm.floorz;
|
||||
thing->ceilingz = tm.ceilingz;
|
||||
|
|
Loading…
Reference in a new issue