- Added another flag to P_FindFloorCeiling() to get it to do its standard processing but

without resetting the actor's sector. The 3D floor checks in P_NightmareRespawn() and
  A_RestoreSpecialPosition now use this.
- Fixed: P_NightmareRespawn() did its Z clamping before checking for 3D floors.
- Fixed: Respawning actors were not clamped to the ceiling.

SVN r3542 (trunk)
This commit is contained in:
Randy Heit 2012-04-08 05:39:46 +00:00
commit d0bba7c3c3
7 changed files with 53 additions and 21 deletions

View file

@ -357,7 +357,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RestoreSpecialPosition)
self->dropoffz =
self->floorz = sec->floorplane.ZatPoint(_x, _y);
self->ceilingz = sec->ceilingplane.ZatPoint(_x, _y);
P_FindFloorCeiling(self, true);
P_FindFloorCeiling(self, FFCF_ONLYSPAWNPOS);
if (self->flags & MF_SPAWNCEILING)
{
@ -385,12 +385,16 @@ DEFINE_ACTION_FUNCTION(AActor, A_RestoreSpecialPosition)
}
}
// Redo floor/ceiling check, in case of 3D floors
P_FindFloorCeiling(self, true);
P_FindFloorCeiling(self, FFCF_SAMESECTOR);
if (self->z < self->floorz)
{ // Do not reappear under the floor, even if that's where we were for the
// initial spawn.
self->z = self->floorz;
}
if (self->z + self->height > self->ceilingz)
{ // Do the same for the ceiling.
self->z = self->ceilingz - self->height;
}
}
int AInventory::StaticLastMessageTic;