mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-24 13:11:30 +00:00
Bug 5048 - Entity constant light does not work correctly, bug found by Eraesr (Eraser?)
This commit is contained in:
parent
055bd3b464
commit
adc143e050
1 changed files with 8 additions and 7 deletions
|
@ -139,16 +139,17 @@ static void CG_EntityEffects( centity_t *cent ) {
|
||||||
|
|
||||||
|
|
||||||
// constant light glow
|
// constant light glow
|
||||||
if ( cent->currentState.constantLight ) {
|
if(cent->currentState.constantLight)
|
||||||
|
{
|
||||||
int cl;
|
int cl;
|
||||||
int i, r, g, b;
|
float i, r, g, b;
|
||||||
|
|
||||||
cl = cent->currentState.constantLight;
|
cl = cent->currentState.constantLight;
|
||||||
r = cl & 255;
|
r = (float) (cl & 0xFF) / 255.0;
|
||||||
g = ( cl >> 8 ) & 255;
|
g = (float) ((cl >> 8) & 0xFF) / 255.0;
|
||||||
b = ( cl >> 16 ) & 255;
|
b = (float) ((cl >> 16) & 0xFF) / 255.0;
|
||||||
i = ( ( cl >> 24 ) & 255 ) * 4;
|
i = (float) ((cl >> 24) & 0xFF) * 4.0;
|
||||||
trap_R_AddLightToScene( cent->lerpOrigin, i, r, g, b );
|
trap_R_AddLightToScene(cent->lerpOrigin, i, r, g, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue