- Moved setting of gameskill from M_ChooseSkill to G_DoNewGame because it

doesn't work in M_ChooseSkill when the full console is open.


SVN r541 (trunk)
This commit is contained in:
Christoph Oelckers 2007-08-09 08:42:15 +00:00
parent 5e2e389bd1
commit 6a3a47d77a
4 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,7 @@
August 9, 2007 (Changes by Graf Zahl)
- Moved setting of gameskill from M_ChooseSkill to G_DoNewGame because it
doesn't work in M_ChooseSkill when the full console is open.
July 28, 2007 (Changes by Graf Zahl) July 28, 2007 (Changes by Graf Zahl)
- fixed: The BFGBall's explosion sequence was missing a state. - fixed: The BFGBall's explosion sequence was missing a state.
- fixed: The brown Chaos Serpent in Hexen had an incorrect sprite for its - fixed: The brown Chaos Serpent in Hexen had an incorrect sprite for its

View File

@ -1369,10 +1369,12 @@ bool CheckWarpTransMap (char mapname[9], bool substitute)
// consoleplayer, playeringame[] should be set. // consoleplayer, playeringame[] should be set.
// //
static char d_mapname[256]; static char d_mapname[256];
static int d_skill;
void G_DeferedInitNew (const char *mapname) void G_DeferedInitNew (const char *mapname, int newskill)
{ {
strncpy (d_mapname, mapname, 8); strncpy (d_mapname, mapname, 8);
d_skill = newskill;
CheckWarpTransMap (d_mapname, true); CheckWarpTransMap (d_mapname, true);
gameaction = ga_newgame2; gameaction = ga_newgame2;
} }
@ -1419,6 +1421,7 @@ CCMD (open)
{ {
delete map; delete map;
gameaction = ga_newgame2; gameaction = ga_newgame2;
d_skill = -1;
} }
} }
else else
@ -1464,6 +1467,7 @@ void G_DoNewGame (void)
{ {
G_NewInit (); G_NewInit ();
playeringame[consoleplayer] = 1; playeringame[consoleplayer] = 1;
if (d_skill != -1) gameskill = d_skill;
G_InitNew (d_mapname, false); G_InitNew (d_mapname, false);
gameaction = ga_nothing; gameaction = ga_nothing;
} }

View File

@ -315,7 +315,7 @@ void G_InitNew (const char *mapname, bool bTitleLevel);
// Can be called by the startup code or M_Responder. // Can be called by the startup code or M_Responder.
// A normal game starts at map 1, // A normal game starts at map 1,
// but a warp test can start elsewhere // but a warp test can start elsewhere
void G_DeferedInitNew (const char *mapname); void G_DeferedInitNew (const char *mapname, int skill = -1);
void G_ExitLevel (int position, bool keepFacing); void G_ExitLevel (int position, bool keepFacing);
void G_SecretExitLevel (int position); void G_SecretExitLevel (int position);

View File

@ -1708,8 +1708,7 @@ void M_VerifyNightmare (int ch)
if (ch != 'y') if (ch != 'y')
return; return;
gameskill = 4; G_DeferedInitNew (EpisodeMaps[epi], 4);
G_DeferedInitNew (EpisodeMaps[epi]);
gamestate = gamestate == GS_FULLCONSOLE ? GS_HIDECONSOLE : gamestate; gamestate = gamestate == GS_FULLCONSOLE ? GS_HIDECONSOLE : gamestate;
M_ClearMenus (); M_ClearMenus ();
} }
@ -1722,8 +1721,7 @@ void M_ChooseSkill (int choice)
return; return;
} }
gameskill = choice; G_DeferedInitNew (EpisodeMaps[epi], choice);
G_DeferedInitNew (EpisodeMaps[epi]);
if (gamestate == GS_FULLCONSOLE) if (gamestate == GS_FULLCONSOLE)
{ {
gamestate = GS_HIDECONSOLE; gamestate = GS_HIDECONSOLE;