Procházet zdrojové kódy

Merge pull request #183 from blackberry-gaming/next-dgough

Next dgough
Sean Paul Taylor před 14 roky
rodič
revize
ab6bf58d2d
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 1 1
      gameplay/src/Game.cpp
  2. 1 1
      gameplay/src/Game.h

+ 1 - 1
gameplay/src/Game.cpp

@@ -293,7 +293,7 @@ void Game::updateOnce()
 
 
 void Game::fireTimeEvents(long frameTime)
 void Game::fireTimeEvents(long frameTime)
 {
 {
-    while (!_timeEvents.empty())
+    while (_timeEvents.size() > 0)
     {
     {
         TimeEvent* timeEvent = &_timeEvents.top();
         TimeEvent* timeEvent = &_timeEvents.top();
         if (timeEvent->time > frameTime)
         if (timeEvent->time > frameTime)

+ 1 - 1
gameplay/src/Game.h

@@ -383,7 +383,7 @@ private:
     AnimationController* _animationController;  // Controls the scheduling and running of animations.
     AnimationController* _animationController;  // Controls the scheduling and running of animations.
     AudioController* _audioController;          // Controls audio sources that are playing in the game.
     AudioController* _audioController;          // Controls audio sources that are playing in the game.
     PhysicsController* _physicsController;      // Controls the simulation of a physics scene and entities.
     PhysicsController* _physicsController;      // Controls the simulation of a physics scene and entities.
-    std::priority_queue<TimeEvent> _timeEvents; // Contains the scheduled time events.
+    std::priority_queue<TimeEvent, std::vector<TimeEvent>, std::less<TimeEvent> > _timeEvents; // Contains the scheduled time events.
 };
 };
 
 
 }
 }