From c6c15fe83c0b7e7fc24f14f86bb685a1711af9dd Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 29 Jan 2016 13:40:37 +0100 Subject: [PATCH] - fixed: AActor::SpawnPoint[2] must store the actor's height above the sector's floor, not above floorz. floorz will represent the current floor the actor is standing on, which may be a 3D floor or a 3D midtexture, but both respawn functions which use this value work from the actual sector floor. --- src/p_mobj.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 67f7d16854..c9693ba477 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -4084,7 +4084,7 @@ AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t } else { - actor->SpawnPoint[2] = (actor->Z() - actor->floorz); + actor->SpawnPoint[2] = (actor->Z() - actor->Sector->floorplane.ZatPoint(actor)); } if (actor->FloatBobPhase == (BYTE)-1) actor->FloatBobPhase = rng(); // Don't make everything bob in sync (unless deliberately told to do)