Skip to content

Commit bf1aa0b

Browse files
committed
- fix brake light pool brightness values (thanks @Natsu235)
1 parent a95d0c1 commit bf1aa0b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src_rebuild/Game/C/cosmetic.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,11 @@ void AddIndicatorLight(CAR_DATA *cp, int Type)
173173
life2 = &cp->ap.life2;
174174

175175
if (cp->ap.life < 0)
176-
brightness = (0xff - (u_int)cp->ap.life) * 2;
176+
brightness = (255 - (u_int)cp->ap.life) * 2 & 255;
177177
else
178-
brightness = cp->ap.life << 1;
179-
180-
col.r = brightness & 0xFF;
178+
brightness = cp->ap.life << 1 & 255;
181179

180+
col.r = brightness;
182181
col.g = 0;
183182
col.b = 0;
184183

0 commit comments

Comments
 (0)