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