- moved the static sky variables into FLevelLocals and removed the redundant ones for the texture ID.

This commit is contained in:
Christoph Oelckers 2019-01-29 04:44:44 +01:00
commit 3c565c9e86
13 changed files with 89 additions and 91 deletions

View file

@ -1001,14 +1001,8 @@ void G_DoLoadLevel (const FString &nextmapname, int position, bool autosave, boo
// setting one.
skyflatnum = TexMan.GetTextureID (gameinfo.SkyFlatName, ETextureType::Flat, FTextureManager::TEXMAN_Overridable);
// DOOM determines the sky texture to be used
// depending on the current episode and the game version.
// [RH] Fetch sky parameters from FLevelLocals.
sky1texture = level.skytexture1;
sky2texture = level.skytexture2;
// [RH] Set up details about sky rendering
R_InitSkyMap ();
InitSkyMap (&level);
for (i = 0; i < MAXPLAYERS; i++)
{
@ -2162,9 +2156,9 @@ DEFINE_ACTION_FUNCTION(FLevelLocals, ChangeSky)
PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals);
PARAM_INT(sky1);
PARAM_INT(sky2);
sky1texture = self->skytexture1 = FSetTextureID(sky1);
sky2texture = self->skytexture2 = FSetTextureID(sky2);
R_InitSkyMap();
self->skytexture1 = FSetTextureID(sky1);
self->skytexture2 = FSetTextureID(sky2);
InitSkyMap(self);
return 0;
}