summaryrefslogtreecommitdiffstats
path: root/Game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Game.cpp')
-rw-r--r--Game.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Game.cpp b/Game.cpp
index 8f8fcab..a8f923f 100644
--- a/Game.cpp
+++ b/Game.cpp
@@ -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)