- Fixed: The correct player class was not remembered when the menu had both

a player class selection menu and an episode menu.
- Fixed: AddToConsole could write outside its working buffer.
- Fixed: 0 was no longer recognized as placeholder for 'no state' in A_Chase.
- Fixed: When picking up weapons the code did not check if it should switch away
  from weak weapons.


SVN r1332 (trunk)
This commit is contained in:
Christoph Oelckers 2008-12-27 20:18:31 +00:00
commit 37d056c041
8 changed files with 73 additions and 16 deletions

View file

@ -267,6 +267,8 @@ static FSaveGameNode NewSaveNode;
static int epi; // Selected episode
static const char *saved_playerclass = NULL;
// PRIVATE MENU DEFINITIONS ------------------------------------------------
//
@ -1821,15 +1823,18 @@ void M_Episode (int choice)
if (AllSkills.Size() == 1)
{
saved_playerclass = NULL;
M_ChooseSkill(0);
return;
}
else if (EpisodeNoSkill[choice])
{
saved_playerclass = NULL;
M_ChooseSkill(AllSkills.Size() == 2? 1:2);
return;
}
M_StartupSkillMenu(NULL);
M_StartupSkillMenu(saved_playerclass);
saved_playerclass = NULL;
}
//==========================================================================
@ -1856,6 +1861,7 @@ static void SCClass (int option)
if (EpiDef.numitems > 1)
{
saved_playerclass = playerclass;
M_SetupNextMenu (&EpiDef);
}
else if (AllSkills.Size() == 1)
@ -1888,6 +1894,7 @@ static void M_ChooseClass (int choice)
if (EpiDef.numitems > 1)
{
saved_playerclass = playerclass;
M_SetupNextMenu (&EpiDef);
}
else if (AllSkills.Size() == 1)