mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-03 02:30:53 +00:00
- Fixed the compatibility handler of AAmbientSound::Serialize.
- Fixed: When moving a sector plane P_CheckPosition must do the same anti-overlap checks for monsters like P_Move to avoid monster pile-ups. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@971 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
a3911620c1
commit
6e67fe0302
3 changed files with 25 additions and 43 deletions
|
@ -844,16 +844,23 @@ bool PIT_CheckThing (AActor *thing, FCheckPosition &tm)
|
|||
|
||||
if (tm.FromPMove)
|
||||
{
|
||||
fixed_t newdist = P_AproxDistance(thing->x - tm.x, thing->y - tm.y);
|
||||
fixed_t olddist = P_AproxDistance(thing->x - tm.thing->x, thing->y - tm.thing->y);
|
||||
|
||||
// Both actors already overlap. To prevent them from remaining stuck allow the move if it
|
||||
// takes them further apart.
|
||||
if (newdist > olddist)
|
||||
// takes them further apart or the move does not change the position (when called from P_ChangeSector.)
|
||||
if (tm.x == tm.thing->x && tm.y == tm.thing->y)
|
||||
{
|
||||
// ... but not if they did not overlap in z-direction before but would after the move.
|
||||
unblocking = !((tm.thing->x >= thing->x + thing->height && tm.x < thing->x + thing->height) ||
|
||||
(tm.thing->x + tm.thing->height <= thing->x && tm.x + tm.thing->height > thing->x));
|
||||
unblocking = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
fixed_t newdist = P_AproxDistance(thing->x - tm.x, thing->y - tm.y);
|
||||
fixed_t olddist = P_AproxDistance(thing->x - tm.thing->x, thing->y - tm.thing->y);
|
||||
|
||||
if (newdist > olddist)
|
||||
{
|
||||
// ... but not if they did not overlap in z-direction before but would after the move.
|
||||
unblocking = !((tm.thing->z >= thing->z + thing->height && tm.z < thing->z + thing->height) ||
|
||||
(tm.thing->z + tm.thing->height <= thing->z && tm.z + tm.thing->height > thing->z));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4512,6 +4519,11 @@ bool P_AdjustFloorCeil (AActor *thing, FChangePosition *cpos)
|
|||
int flags2 = thing->flags2 & MF2_PASSMOBJ;
|
||||
FCheckPosition tm;
|
||||
|
||||
if ((thing->flags2 & MF2_PASSMOBJ) && (thing->flags3 & MF3_ISMONSTER))
|
||||
{
|
||||
tm.FromPMove = true;
|
||||
}
|
||||
|
||||
if (cpos->movemidtex)
|
||||
{
|
||||
// From Eternity:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue