Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int gl_CalcLightLevel(int lightlevel, int rellight, bool weapon)
- {
- int light;
- if (lightlevel == 0) return 0;
- if ((glset.lightmode & 2) && lightlevel < 192 && !weapon)
- {
- light = xs_CRoundToInt(192.f - (192-lightlevel)* 1.95f);
- }
- else
- {
- light=lightlevel;
- }
- if (light<gl_light_ambient && glset.lightmode != 8) // ambient clipping only if not using software lighting model.
- {
- light = gl_light_ambient;
- if (rellight<0) rellight>>=1;
- }
- return clamp(light+rellight, 0, 255);
- }
Advertisement
Add Comment
Please, Sign In to add comment