From c2b320d40810209031dc28df983e4b8191366ece Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 25 Mar 2012 03:25:59 +0000 Subject: [PATCH] - Fixed: Item respawning needs to use the same buggy PointOnSide function as P_SpawnMapThing does. SVN r3484 (trunk) --- src/g_shared/a_pickups.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/g_shared/a_pickups.cpp b/src/g_shared/a_pickups.cpp index b45e419a7..f073499cb 100644 --- a/src/g_shared/a_pickups.cpp +++ b/src/g_shared/a_pickups.cpp @@ -340,10 +340,17 @@ DEFINE_ACTION_FUNCTION(AActor, A_RestoreSpecialPosition) _x = self->SpawnPoint[0]; _y = self->SpawnPoint[1]; - sec = P_PointInSector (_x, _y); - self->SetOrigin (_x, _y, sec->floorplane.ZatPoint (_x, _y)); - P_CheckPosition (self, _x, _y); + self->UnlinkFromWorld(); + self->x = _x; + self->y = _y; + self->LinkToWorld(true); + sec = self->Sector; + self->z = + self->dropoffz = + self->floorz = sec->floorplane.ZatPoint(_x, _y); + self->ceilingz = sec->ceilingplane.ZatPoint(_x, _y); + P_FindFloorCeiling(self, true); if (self->flags & MF_SPAWNCEILING) { @@ -370,7 +377,6 @@ DEFINE_ACTION_FUNCTION(AActor, A_RestoreSpecialPosition) self->z += FloatBobOffsets[(self->FloatBobPhase + level.maptime) & 63]; } } - self->SetOrigin (self->x, self->y, self->z); } int AInventory::StaticLastMessageTic;