From a73b008255860931b03de436345096a23f20a7b5 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 4 Jan 2009 15:51:00 +0000 Subject: [PATCH] - Fixed: For map spawns any change to an actor's floor z-coordinate must be delayed until after its z-coordinate has been set. That means that for map spawns AActor::StaticSpawn may not call P_FindFloorCeiling for such actors. SVN r1352 (trunk) --- docs/rh-log.txt | 4 ++++ src/p_mobj.cpp | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 99967035f..96e0f836f 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,8 @@ January 4, 2009 (Changes by Graf Zahl) +- Fixed: For map spawns any change to an actor's floor z-coordinate must be + delayed until after its z-coordinate has been set. That means that for + map spawns AActor::StaticSpawn may not call P_FindFloorCeiling for such + actors. - added GZDoom's 3D floor physics code. This is not active yet so anything compiled from this code won't have any support for it! - Used new functionality to avoid moving the puff around in SpawnDeepSplash. diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 853d21d3e..385b2a8ea 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -3226,8 +3226,9 @@ AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t actor->ceilingsector = actor->Sector; actor->ceilingpic = actor->ceilingsector->GetTexture(sector_t::ceiling); // Check if there's something solid to stand on between the current position and the - // current sector's floor. - P_FindFloorCeiling(actor, true); + // current sector's floor. For map spawns this must be delayed until after setting the + // z-coordinate. + if (!SpawningMapThing) P_FindFloorCeiling(actor, true); } else if (!(actor->flags5 & MF5_NOINTERACTION)) {