mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-23 19:31:05 +00:00
Fix hanging bug if A_ConnectToGround's supplied object's height is zero.
This commit is contained in:
parent
01dfe31c3c
commit
e054208a31
1 changed files with 7 additions and 3 deletions
|
@ -11391,7 +11391,8 @@ void A_ConnectToGround(mobj_t *actor)
|
|||
return;
|
||||
#endif
|
||||
|
||||
P_AdjustMobjFloorZ_FFloors(actor, actor->subsector->sector, 2);
|
||||
if (actor->subsector->sector->ffloors)
|
||||
P_AdjustMobjFloorZ_FFloors(actor, actor->subsector->sector, 2);
|
||||
|
||||
if (actor->flags2 & MF2_OBJECTFLIP)
|
||||
{
|
||||
|
@ -11406,15 +11407,18 @@ void A_ConnectToGround(mobj_t *actor)
|
|||
|
||||
if (locvar2)
|
||||
{
|
||||
workh = FixedMul(mobjinfo[locvar2].height, actor->scale);
|
||||
if (actor->flags2 & MF2_OBJECTFLIP)
|
||||
workz -= FixedMul(mobjinfo[locvar2].height, actor->scale);
|
||||
workz -= workh;
|
||||
work = P_SpawnMobjFromMobj(actor, 0, 0, workz, locvar2);
|
||||
workz += dir*workh;
|
||||
}
|
||||
|
||||
if (!locvar1)
|
||||
return;
|
||||
|
||||
workh = FixedMul(mobjinfo[locvar1].height, actor->scale);
|
||||
if (!(workh = FixedMul(mobjinfo[locvar1].height, actor->scale)))
|
||||
return;
|
||||
|
||||
if (actor->flags2 & MF2_OBJECTFLIP)
|
||||
workz -= workh;
|
||||
|
|
Loading…
Reference in a new issue