diff options
author | Simon Howard | 2005-10-13 23:12:30 +0000 |
---|---|---|
committer | Simon Howard | 2005-10-13 23:12:30 +0000 |
commit | 1d4f9587578a47fb4c09b6f6596c21552f064df5 (patch) | |
tree | 4cae960a6028ec05521005849ee592bbdce3b508 | |
parent | 29571c16efee0d4d4a864a9ea222f5c3c2add4c3 (diff) | |
download | chocolate-doom-1d4f9587578a47fb4c09b6f6596c21552f064df5.tar.gz chocolate-doom-1d4f9587578a47fb4c09b6f6596c21552f064df5.tar.bz2 chocolate-doom-1d4f9587578a47fb4c09b6f6596c21552f064df5.zip |
Fix Doom 1 skies
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 192
-rw-r--r-- | src/g_game.c | 57 |
1 files changed, 24 insertions, 33 deletions
diff --git a/src/g_game.c b/src/g_game.c index d643043c..6405343f 100644 --- 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 @@ void G_DoLoadLevel (void) // 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 @@ void G_DoLoadLevel (void) 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 @@ G_InitNew 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 (); } |