- Extended MF5_MOVEWITHSECTOR so that it always keeps the actor on the ground

of a moving floor, regardless of movement speed. For NOBLOCKMAP items this
  is necessary because otherwise they can be left in the air and it also adds 
  some options for other things.


SVN r1540 (trunk)
This commit is contained in:
Christoph Oelckers 2009-04-10 06:50:39 +00:00
commit d3b6dfb0f1
2 changed files with 13 additions and 3 deletions

View file

@ -4442,7 +4442,7 @@ void PIT_FloorDrop (AActor *thing, FChangePosition *cpos)
thing->z = thing->z - oldfloorz + thing->floorz;
P_CheckFakeFloorTriggers (thing, oldz);
}
else if ((thing->flags & MF_NOGRAVITY) ||
else if ((thing->flags & MF_NOGRAVITY) || (thing->flags5 & MF5_MOVEWITHSECTOR) ||
(((cpos->sector->Flags & SECF_FLOORDROP) || cpos->moveamt < 9*FRACUNIT)
&& thing->z - thing->floorz <= cpos->moveamt))
{
@ -4634,7 +4634,11 @@ bool P_ChangeSector (sector_t *sector, int crunch, int amt, int floorOrCeil, boo
if (!n->visited)
{
n->visited = true;
if (!(n->m_thing->flags&MF_NOBLOCKMAP)) iterator(n->m_thing, &cpos);
if (!(n->m_thing->flags & MF_NOBLOCKMAP) || //jff 4/7/98 don't do these
(n->m_thing->flags5 & MF5_MOVEWITHSECTOR))
{
iterator(n->m_thing, &cpos);
}
break;
}
}