- fixed broken end of level timer in Duke.

Fixes #342
This commit is contained in:
Christoph Oelckers 2020-09-05 17:56:35 +02:00
parent 55c7c56709
commit 607d30ef8e
4 changed files with 8 additions and 4 deletions

View file

@ -693,7 +693,7 @@ int ParseState::parse(void)
insptr++;
ps[g_p].timebeforeexit = *insptr;
ps[g_p].customexitsound = -1;
ChangeLevel(nullptr, -1);
ud.eog = true;
insptr++;
break;

View file

@ -1038,10 +1038,13 @@ void startnewgame(MapRecord* map, int skill)
bool setnextmap(bool checksecretexit)
{
MapRecord *map;
MapRecord* map = nullptr;;
int from_bonus = 0;
if (checksecretexit && ud.from_bonus == 0)
if (ud.eog)
{
}
else if (checksecretexit && ud.from_bonus == 0)
{
if (ud.secretlevel > 0)
{

View file

@ -396,6 +396,7 @@ void GameInterface::SerializeGameState(FSerializer& arc)
("respawn_items", ud.respawn_items)
("respawn_inventory", ud.respawn_inventory)
("god", ud.god)
("eog", ud.eog)
//("auto_run", ud.auto_run)
("monsters_off", ud.monsters_off)
("last_level", ud.last_level)

View file

@ -52,7 +52,7 @@ struct TileInfo
struct user_defs
{
int levelclock;
unsigned char god, cashman;
unsigned char god, cashman, eog;
unsigned char show_help, scrollmode, clipping;
char user_name[MAXPLAYERS][32];
unsigned char showweapons;