Browse Source

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.
Adam Johnson 13 years ago
parent
commit
efd03fc33e
  1. 2
      Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.cpp

2
Sources/Plasma/PubUtilLib/plPhysical/plCollisionDetector.cpp

@ -276,12 +276,14 @@ void plCameraRegionDetector::ISendSavedTriggerMsgs()
if (fSavedMsgEnterFlag) if (fSavedMsgEnterFlag)
{ {
fMessages[i]->SetCmd(plCameraMsg::kEntering); 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()); DetectorLog("Entering cameraRegion: %s - Evals=%d -msg %d of %d\n", GetKeyName().c_str(),fNumEvals,i+1,fMessages.size());
fIsInside = true; fIsInside = true;
} }
else else
{ {
fMessages[i]->ClearCmd(plCameraMsg::kEntering); 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()); DetectorLog("Exiting cameraRegion: %s - Evals=%d -msg %d of %d\n", GetKeyName().c_str(),fNumEvals,i+1,fMessages.size());
fIsInside = false; fIsInside = false;
} }

Loading…
Cancel
Save