Only do event processing for ipo actuators on frames.
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>
Wed, 1 Dec 2004 08:43:58 +0000 (08:43 +0000)
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>
Wed, 1 Dec 2004 08:43:58 +0000 (08:43 +0000)
source/gameengine/Ketsji/KX_IpoActuator.cpp
source/gameengine/Ketsji/KX_KetsjiEngine.cpp

index 66850b2f60b2ab65ff1fe2b09e13cb28ba36f427..ea9fe8554ccf178cc0a01157b1fae9e4f6af6b79 100644 (file)
@@ -191,22 +191,24 @@ bool KX_IpoActuator::Update(double curtime, bool frame)
        bool bNegativeEvent = false;
        int numevents = m_events.size();
 
-       for (vector<CValue*>::iterator i=m_events.end(); !(i==m_events.begin());)
+       if (frame)
        {
-               i--;
-               if ((*i)->GetNumber() == 0.0f)
-                       bNegativeEvent = true;
-               
-               (*i)->Release();
-               m_events.pop_back();
-       }
-
-       if (bNegativeEvent)
-       {
-               RemoveAllEvents();
+               for (vector<CValue*>::iterator i=m_events.end(); !(i==m_events.begin());)
+               {
+                       --i;
+                       if ((*i)->GetNumber() == 0.0f)
+                               bNegativeEvent = true;
+                       
+                       (*i)->Release();
+               }
+               m_events.clear();
+       
+               if (bNegativeEvent)
+               {
+                       RemoveAllEvents();
+               }
        }
        
-
        double  start_smaller_then_end = ( m_startframe < m_endframe ? 1.0 : -1.0);
 
        bool result=true;
index 3bd36aebc93f48a4d0f58351800ab5025b470a10..f74cdc31fcdaa76cebe5f60c68fb5357f34fb152 100644 (file)
@@ -797,6 +797,8 @@ void KX_KetsjiEngine::RenderFrame(KX_Scene* scene)
                        left, right, bottom, top, nearfrust, farfrust);
        
                cam->SetProjectionMatrix(projmat);
+               
+               // Otherwise the projection matrix for each eye will be the same...
                if (m_rasterizer->Stereo())
                        cam->InvalidateProjectionMatrix();
        }