- fixed: A new episode definition for a map that already had one defined did not replace the old definition.

- fixed: Skipping the skill menu did not work because it checked the number of episodes, not skills.


SVN r3017 (trunk)
This commit is contained in:
Christoph Oelckers 2010-12-02 13:57:05 +00:00
parent d9c811fc61
commit 5bc4bc90bb
2 changed files with 8 additions and 2 deletions

View File

@ -1626,7 +1626,13 @@ void FMapInfoParser::ParseEpisodeInfo ()
}
else
{
FEpisode *epi = &AllEpisodes[AllEpisodes.Reserve(1)];
// Only allocate a new entry if this doesn't replace an existing episode.
if (i >= AllEpisodes.Size())
{
i = AllEpisodes.Reserve(1);
}
FEpisode *epi = &AllEpisodes[i];
epi->mEpisodeMap = map;
epi->mEpisodeName = name;

View File

@ -1327,7 +1327,7 @@ void M_StartupSkillMenu(FGameStartup *gs)
}
if (AllEpisodes[gs->Episode].mNoSkill || AllSkills.Size() == 1)
{
ld->mAutoselect = firstitem + MIN(2u, AllEpisodes.Size()-1);
ld->mAutoselect = firstitem + MIN(2u, AllSkills.Size()-1);
}
else
{