Browse Source

ref: gl: support kRenderFxLightMultiplier

* add undocumented kRenderFxLightMultiplier to const.h
pull/2/head
Alibek Omarov 12 months ago
parent
commit
9304a0041d
  1. 1
      common/const.h
  2. 7
      ref/gl/gl_studio.c

1
common/const.h

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

7
ref/gl/gl_studio.c

@ -1435,6 +1435,13 @@ void R_StudioDynamicLight( cl_entity_t *ent, alight_t *plight ) @@ -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 );
ent->cvFloorColor = light;

Loading…
Cancel
Save