[Super-tux-commit] supertux/src worldmap.cpp,1.74,1.75
Brought to you by:
wkendrick
From: Ricardo C. <rm...@us...> - 2004-05-17 10:15:13
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12576/src Modified Files: worldmap.cpp Log Message: Made player to use the old status when aborting a level. Index: worldmap.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/worldmap.cpp,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -r1.74 -r1.75 --- worldmap.cpp 16 May 2004 17:44:39 -0000 1.74 +++ worldmap.cpp 17 May 2004 10:15:01 -0000 1.75 @@ -638,6 +638,8 @@ if (level->x == tux->get_tile_pos().x && level->y == tux->get_tile_pos().y) { + PlayerStatus old_player_status = player_status; + std::cout << "Enter the current level: " << level->name << std::endl;; GameSession session(datadir + "/levels/" + level->name, 1, ST_GL_LOAD_LEVEL_FILE); @@ -698,13 +700,9 @@ break; case GameSession::ES_LEVEL_ABORT: - // Reseting the player_status might be a worthy - // consideration, but I don't think we need it - // 'cause only the bad players will use it to - // 'cheat' a few items and that isn't necesarry a - // bad thing (ie. better they continue that way, - // then stop playing the game all together since it - // is to hard) + /* In case the player's abort the level, keep it using the old + status */ + player_status = old_player_status; break; case GameSession::ES_GAME_OVER: /* draw an end screen */ |