diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 06ee14b4d..8bddbe966 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,7 @@ December 15, 2008 +- Fixed: Autoloading a game (e.g. respawning after dying in single player) + during demo playback prematurely ended demo control of the player. +- Fixed: Loading a multiplayer save with only one player crashed. - Changed the co-op intermission screen to draw the stats with the small font. - Added Karate Chris's patch to optionally specify an angle offset for summoning. diff --git a/src/d_event.h b/src/d_event.h index 34790aa25..1ace621ed 100644 --- a/src/d_event.h +++ b/src/d_event.h @@ -61,6 +61,7 @@ typedef enum ga_newgame, ga_newgame2, ga_loadgame, + ga_autoloadgame, ga_savegame, ga_autosave, ga_playdemo, diff --git a/src/g_game.cpp b/src/g_game.cpp index e5b547574..494a2fd20 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -900,6 +900,7 @@ void G_Ticker () G_DoNewGame (); break; case ga_loadgame: + case ga_autoloadgame: G_DoLoadGame (); break; case ga_savegame: @@ -1424,7 +1425,7 @@ void G_DoReborn (int playernum, bool freshbot) if (BackupSaveName.Len() > 0 && FileExists (BackupSaveName.GetChars())) { // Load game from the last point it was saved savename = BackupSaveName; - gameaction = ga_loadgame; + gameaction = ga_autoloadgame; } else { // Reload the level from scratch @@ -1698,8 +1699,11 @@ void G_DoLoadGame () char *text = NULL; char *map; + if (gameaction != ga_autoloadgame) + { + demoplayback = false; + } gameaction = ga_nothing; - demoplayback = false; FILE *stdfile = fopen (savename.GetChars(), "rb"); if (stdfile == NULL)