shithub: choc

Download patch

ref: 1d4f9587578a47fb4c09b6f6596c21552f064df5
parent: 29571c16efee0d4d4a864a9ea222f5c3c2add4c3
author: Simon Howard <[email protected]>
date: Thu Oct 13 19:12:30 EDT 2005

Fix Doom 1 skies

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 192

--- a/src/g_game.c
+++ b/src/g_game.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: g_game.c 160 2005-10-03 21:39:39Z fraggle $
+// $Id: g_game.c 192 2005-10-13 23:12:30Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.13  2005/10/13 23:12:30  fraggle
+// Fix Doom 1 skies
+//
 // Revision 1.12  2005/10/03 21:39:39  fraggle
 // Dehacked text substitutions
 //
@@ -74,7 +77,7 @@
 
 
 static const char
-rcsid[] = "$Id: g_game.c 160 2005-10-03 21:39:39Z fraggle $";
+rcsid[] = "$Id: g_game.c 192 2005-10-13 23:12:30Z fraggle $";
 
 #include <string.h>
 #include <stdlib.h>
@@ -532,9 +535,8 @@
 
     // DOOM determines the sky texture to be used
     // depending on the current episode, and the game version.
-    if ( (gamemode == commercial)
-	 || ( gamemode == pack_tnt )
-	 || ( gamemode == pack_plut ) )
+
+    if ( gamemode == commercial)
     {
 	skytexture = R_TextureNumForName ("SKY3");
 	if (gamemap < 12)
@@ -543,7 +545,23 @@
 	    if (gamemap < 21)
 		skytexture = R_TextureNumForName ("SKY2");
     }
-
+    else
+	switch (gameepisode) 
+	{ 
+	  case 1: 
+	    skytexture = R_TextureNumForName ("SKY1"); 
+	    break; 
+	  case 2: 
+	    skytexture = R_TextureNumForName ("SKY2"); 
+	    break; 
+	  case 3: 
+	    skytexture = R_TextureNumForName ("SKY3"); 
+	    break; 
+	  case 4:	// Special Edition sky
+	    skytexture = R_TextureNumForName ("SKY4");
+	    break;
+	} 
+ 
     levelstarttic = gametic;        // for time calculation
     
     if (wipegamestate == GS_LEVEL) 
@@ -1525,33 +1543,6 @@
  
     viewactive = true;
     
-    // set the sky map for the episode
-    if ( gamemode == commercial)
-    {
-	skytexture = R_TextureNumForName ("SKY3");
-	if (gamemap < 12)
-	    skytexture = R_TextureNumForName ("SKY1");
-	else
-	    if (gamemap < 21)
-		skytexture = R_TextureNumForName ("SKY2");
-    }
-    else
-	switch (episode) 
-	{ 
-	  case 1: 
-	    skytexture = R_TextureNumForName ("SKY1"); 
-	    break; 
-	  case 2: 
-	    skytexture = R_TextureNumForName ("SKY2"); 
-	    break; 
-	  case 3: 
-	    skytexture = R_TextureNumForName ("SKY3"); 
-	    break; 
-	  case 4:	// Special Edition sky
-	    skytexture = R_TextureNumForName ("SKY4");
-	    break;
-	} 
- 
     G_DoLoadLevel (); 
 }