From d8f509a73a8315c7539244902b1a8baa1fcbb506 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 3 Apr 2012 03:45:05 +0000 Subject: [PATCH] - Fixed: Monster respawning did not redo floorz/ceilingz for 3D floors after positioning the item. - Fixed: Monster respawning used the newly spawned monster's SpawnPoint to determine what to shift the Z position by. This is, naturally, always 0. SVN r3510 (trunk) --- src/p_mobj.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index d92e50de5..005e10257 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -2467,9 +2467,9 @@ void P_NightmareRespawn (AActor *mobj) mo = AActor::StaticSpawn(RUNTIME_TYPE(mobj), x, y, z, NO_REPLACE, true); if (z == ONFLOORZ) - mo->z += mo->SpawnPoint[2]; + mo->z += mobj->SpawnPoint[2]; else if (z == ONCEILINGZ) - mo->z -= mo->SpawnPoint[2]; + mo->z -= mobj->SpawnPoint[2]; // something is occupying its position? if (!P_TestMobjLocation (mo)) @@ -2480,6 +2480,9 @@ void P_NightmareRespawn (AActor *mobj) return; // no respawn } + // If there are 3D floors, we need to find floor/ceiling again. + P_FindFloorCeiling(mo); + z = mo->z; // inherit attributes from deceased one