Exposed some skymist variables to zscript. Created zscript levellocals functions ChangeSkyMist(TextureID skymist, bool usemist = true), SetSkyFog(int density), and SetThickFog(float distance, float multiplier), so people aren't tied to MAPINFO for such things.

This commit is contained in:
Dileep V. Reddy 2025-05-18 17:48:32 -06:00 committed by Ricardo Luís Vaz Silva
commit 95164cce51
4 changed files with 39 additions and 1 deletions

View file

@ -1742,11 +1742,39 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetXOffset, SetXOffset)
{
PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals);
PARAM_INT(skymist);
PARAM_BOOL(usemist);
self->skymisttexture = FSetTextureID(skymist);
if (usemist)
{
self->flags3 |= LEVEL3_SKYMIST;
}
else
{
self->flags3 &= ~LEVEL3_SKYMIST;
}
InitSkyMap(self);
return 0;
}
DEFINE_ACTION_FUNCTION(FLevelLocals, SetSkyFog)
{
PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals);
PARAM_INT(fogdensity);
self->skyfog = fogdensity;
InitSkyMap(self);
return 0;
}
DEFINE_ACTION_FUNCTION(FLevelLocals, SetThickFog)
{
PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals);
PARAM_FLOAT(distance);
PARAM_FLOAT(multiplier);
self->thickfogdistance = distance;
if (multiplier > 0.0) self->thickfogmultiplier = multiplier;
return 0;
}
DEFINE_ACTION_FUNCTION(FLevelLocals, StartIntermission)
{
PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals);