Просмотр исходного кода

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

Next dgough
Sean Paul Taylor 14 лет назад
Родитель
Сommit
ab6bf58d2d
2 измененных файлов с 2 добавлено и 2 удалено
  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)
 {
-    while (!_timeEvents.empty())
+    while (_timeEvents.size() > 0)
     {
         TimeEvent* timeEvent = &_timeEvents.top();
         if (timeEvent->time > frameTime)

+ 1 - 1
gameplay/src/Game.h

@@ -383,7 +383,7 @@ private:
     AnimationController* _animationController;  // Controls the scheduling and running of animations.
     AudioController* _audioController;          // Controls audio sources that are playing in the game.
     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.
 };
 
 }