2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 09:56:22 +01:00

ref: gl: support kRenderFxLightMultiplier

* add undocumented kRenderFxLightMultiplier to const.h
This commit is contained in:
Alibek Omarov 2024-01-06 19:21:11 +03:00
parent 64f92003fa
commit 9304a0041d
2 changed files with 8 additions and 0 deletions

View File

@ -717,6 +717,7 @@ enum
kRenderFxExplode, // Scale up really big! kRenderFxExplode, // Scale up really big!
kRenderFxGlowShell, // Glowing Shell kRenderFxGlowShell, // Glowing Shell
kRenderFxClampMinScale, // Keep this sprite from getting very small (SPRITES only!) kRenderFxClampMinScale, // Keep this sprite from getting very small (SPRITES only!)
kRenderFxLightMultiplier,
}; };
typedef int func_t; typedef int func_t;

View File

@ -1435,6 +1435,13 @@ void R_StudioDynamicLight( cl_entity_t *ent, alight_t *plight )
} }
} }
if( ent->curstate.renderfx == kRenderFxLightMultiplier && ent->curstate.iuser4 != 10 )
{
light.r *= ent->curstate.iuser4 / 10.0f;
light.g *= ent->curstate.iuser4 / 10.0f;
light.b *= ent->curstate.iuser4 / 10.0f;
}
VectorSet( finalLight, light.r, light.g, light.b ); VectorSet( finalLight, light.r, light.g, light.b );
ent->cvFloorColor = light; ent->cvFloorColor = light;