osezer patch 012
authorDan Olson <theoddone33@icculus.org>
Thu, 24 Apr 2008 07:04:46 +0000 (00:04 -0700)
committerDan Olson <theoddone33@icculus.org>
Thu, 24 Apr 2008 07:04:46 +0000 (00:04 -0700)
memu: don't allow saving when not in a level, demoplaying or when the player is dead.

base/mn_menu.c

index 2b471d1..2ce5551 100644 (file)
@@ -1318,6 +1318,14 @@ static void SCLoadGame(int option)
 static void SCSaveGame(int option)
 {
        char *ptr;
+       player_t *player = &players[consoleplayer];
+
+       if(gamestate != GS_LEVEL || demoplayback
+               || player->playerstate == PST_DEAD)
+       {
+               FileMenuKeySteal = false;
+               return;
+       }
 
        if(!FileMenuKeySteal)
        {