foxygit / doom Log in
commit e8ad50b8fb2c69710f945a5bdfe2cf046f535261
Author:     mfrancis95 <mikefrancis95@gmail.com>
AuthorDate: Mon Jun 3 02:45:39 2019 -0400
Commit:     mfrancis95 <mikefrancis95@gmail.com>
CommitDate: Mon Jun 3 02:45:39 2019 -0400

    Always try to load SKY3 when starting a new game in Doom II (resolve #921)
---
 src/doom/g_game.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/doom/g_game.c b/src/doom/g_game.c
index 7da1576f..9cabfaf8 100644
--- a/src/doom/g_game.c
+++ b/src/doom/g_game.c
@@ -1866,12 +1866,13 @@ G_InitNew

     if (gamemode == commercial)
     {
-        if (gamemap < 12)
-            skytexturename = "SKY1";
-        else if (gamemap < 21)
-            skytexturename = "SKY2";
-        else
-            skytexturename = "SKY3";
+        skytexturename = DEH_String("SKY3");
+        skytexture = R_TextureNumForName(skytexturename);
+        if (gamemap < 21)
+        {
+            skytexturename = DEH_String(gamemap < 12 ? "SKY1" : "SKY2");
+            skytexture = R_TextureNumForName(skytexturename);
+        }
     }
     else
     {
@@ -1891,13 +1892,10 @@ G_InitNew
             skytexturename = "SKY4";
             break;
         }
+        skytexturename = DEH_String(skytexturename);
+        skytexture = R_TextureNumForName(skytexturename);
     }

-    skytexturename = DEH_String(skytexturename);
-
-    skytexture = R_TextureNumForName(skytexturename);
-
-
     G_DoLoadLevel ();
 }