summaryrefslogtreecommitdiff
path: root/src/doom/g_game.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/doom/g_game.c')
-rw-r--r--src/doom/g_game.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/doom/g_game.c b/src/doom/g_game.c
index 64f5b274..bc582a52 100644
--- a/src/doom/g_game.c
+++ b/src/doom/g_game.c
@@ -612,6 +612,30 @@ void G_DoLoadLevel (void)
skyflatnum = R_FlatNumForName(DEH_String(SKYFLATNAME));
+ // The "Sky never changes in Doom II" bug was fixed in
+ // the id Anthology version of doom2.exe for Final Doom.
+ if ((gamemode == commercial) && (gameversion == exe_final2))
+ {
+ char *skytexturename;
+
+ if (gamemap < 12)
+ {
+ skytexturename = "SKY1";
+ }
+ else if (gamemap < 21)
+ {
+ skytexturename = "SKY2";
+ }
+ else
+ {
+ skytexturename = "SKY3";
+ }
+
+ skytexturename = DEH_String(skytexturename);
+
+ skytexture = R_TextureNumForName(skytexturename);
+ }
+
levelstarttic = gametic; // for time calculation
if (wipegamestate == GS_LEVEL)