From efd03fc33ec727d02da77e917d067ebe3c15d021 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Wed, 22 Feb 2012 01:24:12 -0500 Subject: [PATCH] Pop cameras when we exit a region Fixes issues with cameras that have been added to the stack in python using that weird spawn point hack. --- Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.cpp b/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.cpp index 57a3648d..c0b03ffd 100644 --- a/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.cpp +++ b/Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.cpp @@ -276,12 +276,14 @@ void plCameraRegionDetector::ISendSavedTriggerMsgs() if (fSavedMsgEnterFlag) { fMessages[i]->SetCmd(plCameraMsg::kEntering); + fMessages[i]->ClearCmd(plCameraMsg::kPop); DetectorLog("Entering cameraRegion: %s - Evals=%d -msg %d of %d\n", GetKeyName().c_str(),fNumEvals,i+1,fMessages.size()); fIsInside = true; } else { fMessages[i]->ClearCmd(plCameraMsg::kEntering); + fMessages[i]->SetCmd(plCameraMsg::kPop); // for spawnpoints with a camera stack DetectorLog("Exiting cameraRegion: %s - Evals=%d -msg %d of %d\n", GetKeyName().c_str(),fNumEvals,i+1,fMessages.size()); fIsInside = false; }