Update of /cvsroot/super-tux/supertux/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17297/src
Modified Files:
gameloop.cpp
Log Message:
added two new cheat codes:
"shrink" lets Tux react like being hit by an enemy
"kill" kills Tux (useful if stuck in an unfinished level)
Index: gameloop.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/gameloop.cpp,v
retrieving revision 1.176
retrieving revision 1.177
diff -u -d -r1.176 -r1.177
--- gameloop.cpp 15 Sep 2004 11:50:31 -0000 1.176
+++ gameloop.cpp 15 Sep 2004 21:38:49 -0000 1.177
@@ -433,7 +433,16 @@
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:
|