added two new cheat codes:
authorMarek Moeckel <wansti@gmx.de>
Wed, 15 Sep 2004 21:38:49 +0000 (21:38 +0000)
committerMarek Moeckel <wansti@gmx.de>
Wed, 15 Sep 2004 21:38:49 +0000 (21:38 +0000)
"shrink" lets Tux react like being hit by an enemy
"kill" kills Tux (useful if stuck in an unfinished level)

SVN-Revision: 1920

src/gameloop.cpp

index 4431f16..697d9f5 100644 (file)
@@ -433,7 +433,16 @@ GameSession::process_events()
                           tux.invincible_timer.start(time_left.get_left());
                           last_keys.clear();
                           }
-
+                                                               if(compare_last(last_keys, "shrink"))
+                          {    // remove powerups
+                          tux.kill(tux.SHRINK);
+                          last_keys.clear();
+                          }
+                                                               if(compare_last(last_keys, "kill"))
+                          {    // kill Tux
+                          tux.kill(tux.KILL);
+                          last_keys.clear();
+                          }
                   break;
 
                 case SDL_JOYAXISMOTION: