- changed the linedef translator into a struct and reorganized its storage to allow having different ones at the same time.

This was the last piece of data that couldn't be distinct for more than one level.
This commit is contained in:
Christoph Oelckers 2019-02-02 01:14:51 +01:00
commit 8d83f03138
14 changed files with 220 additions and 116 deletions

View file

@ -294,9 +294,9 @@ void T_LoadScripts(FLevelLocals *Level, MapData *map)
// the default translator is being used.
// Custom translators will not be patched.
if ((gameinfo.gametype == GAME_Doom || gameinfo.gametype == GAME_Heretic) && Level->info->Translator.IsEmpty() &&
Level->maptype == MAPTYPE_DOOM && SimpleLineTranslations.Size() > 272 && SimpleLineTranslations[272 - 2*HasScripts].special == FS_Execute)
Level->maptype == MAPTYPE_DOOM && Level->Translator->SimpleLineTranslations.Size() > 272 && Level->Translator->SimpleLineTranslations[272 - 2*HasScripts].special == FS_Execute)
{
std::swap(SimpleLineTranslations[270], SimpleLineTranslations[272]);
std::swap(Level->Translator->SimpleLineTranslations[270], Level->Translator->SimpleLineTranslations[272]);
}
}