diff options
Diffstat (limited to 'Game.cpp')
-rw-r--r-- | Game.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -125,12 +125,14 @@ bool Game::isRunning() { // main function to be called within glut loop
void Game::updateGame(uint timeElapsedMs) {
- if (m_gameRunning) {
+ if (!m_gameRunning)
+ return;
+
// ask the AI if they wanna change something?
for(std::vector<Player*>::iterator it = m_vpPlayers.begin(); it != m_vpPlayers.end(); ++it) {
if ((*it)->isAlive()) {
if ((*it)->getController()) {
- (*it)->getController()->think();
+ (*it)->getController()->think();
}
}
}
@@ -188,7 +190,6 @@ void Game::updateGame(uint timeElapsedMs) { }
} catch (std::exception out_of_bounds) {} // don't do anything
}
- }
}
void Game::killPlayer(Player *player)
|