on_escape_press is now handled first in GameSession::update(). Using ESC to close...
authorChristoph Sommer <mail@christoph-sommer.de>
Wed, 26 Apr 2006 12:23:41 +0000 (12:23 +0000)
committerChristoph Sommer <mail@christoph-sommer.de>
Wed, 26 Apr 2006 12:23:41 +0000 (12:23 +0000)
SVN-Revision: 3441

src/game_session.cpp

index 9deb153..5cfa5ad 100644 (file)
@@ -445,15 +445,15 @@ GameSession::setup()
 void
 GameSession::update(float elapsed_time)
 {
+  // handle controller
+  if(main_controller->pressed(Controller::PAUSE_MENU))
+    on_escape_press();
+  
   process_events();
   process_menu();
 
   check_end_conditions();
 
-  // handle controller
-  if(main_controller->pressed(Controller::PAUSE_MENU))
-    on_escape_press();
-  
   // respawning in new sector?
   if(newsector != "" && newspawnpoint != "") {
     Sector* sector = level->get_sector(newsector);