From 698d62bbc67c21212a55e100b1576d3120b60bd4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 2 May 2021 19:41:24 +0200 Subject: [PATCH] - merged FixMapInfo into loadcons. No need to delay the remaining content. The reasons for the separate function no longer exist. --- source/games/duke/src/funct.h | 1 - source/games/duke/src/game.cpp | 1 - source/games/duke/src/gamedef.cpp | 7 ++----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/source/games/duke/src/funct.h b/source/games/duke/src/funct.h index 83d4bbc27..64b9199f6 100644 --- a/source/games/duke/src/funct.h +++ b/source/games/duke/src/funct.h @@ -227,7 +227,6 @@ void PlayerColorChanged(void); bool movementBlocked(player_struct *p); void loadcons(); void recordoldspritepos(); -void FixMapinfo(); int* animateptr(int i); diff --git a/source/games/duke/src/game.cpp b/source/games/duke/src/game.cpp index 8e580c9f0..da5c038cf 100644 --- a/source/games/duke/src/game.cpp +++ b/source/games/duke/src/game.cpp @@ -325,7 +325,6 @@ void GameInterface::app_init() screenpeek = myconnectindex; LoadDefinitions(); - FixMapinfo(); // Add some corrections. Can only be done after .def has been parsed. fi.InitFonts(); SetTileNames(); TileFiles.SetBackup(); diff --git a/source/games/duke/src/gamedef.cpp b/source/games/duke/src/gamedef.cpp index 9d018b8fb..51c912959 100644 --- a/source/games/duke/src/gamedef.cpp +++ b/source/games/duke/src/gamedef.cpp @@ -3230,14 +3230,11 @@ void loadcons() S_WorldTourMappingsForOldSounds(); // create a sound mapping for World Tour. S_CacheAllSounds(); comp.setmusic(); -} -void FixMapinfo() -{ // RR must link the last map of E1 to the first map of E2. - for (auto& map : mapList) + if (isRR()) for (auto& map : mapList) { - if (isRR() && map->cluster == 1) + if (map->cluster == 1) { if (!FindMapByIndexOnly(map->cluster, map->mapindex + 1)) {