Skip to content

Commit c1988e2

Browse files
committed
Cut down random colour code + Removed evil space
1 parent d80a725 commit c1988e2

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

data/Vehicle_Patterns.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Thread Original Vehicle Seats Cars Bikes Bicycles Quadbikes Planes Helicopters Boats Trains Trailers Flags Alternate Coordinates Alt Coord Notes
1+
#Thread Original Vehicle Seats Cars Bikes Bicycles Quadbikes Planes Helicopters Boats Trains Trailers Flags Alternate Coordinates Alt Coord Notes
22
# X Y Z
33
intro Copcarla 4 Y N N N Y Y N Y N
44
lowr Savanna 2 Y Y Y Y Y Y Y Y N

src/colours.cc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,7 @@ void RandomizeWeaponSpriteColours (float x, float y, float z, float halfw,
307307
else
308308
{
309309
static ColourRandomizer::Pattern weaponSpriteColours
310-
= {-1, {-1, -1, -1}};
311-
if (weaponSpriteColours.ID == -1)
312-
weaponSpriteColours = {1, {random (255), random (255), b}};
310+
= { 1, {random (255), random (255), b}};
313311
colour
314312
= {weaponSpriteColours.colours[0], weaponSpriteColours.colours[1],
315313
weaponSpriteColours.colours[2], a};
@@ -330,9 +328,7 @@ RandomizeWeatherEffectColours (float x, float y, float z, float w, float h,
330328
if (address == 0x715EDF)
331329
{
332330
static ColourRandomizer::Pattern cloudColourHigh
333-
= {-1, {-1, -1, -1}};
334-
if (cloudColourHigh.ID == -1)
335-
cloudColourHigh = {1, {random (255), b, a}};
331+
= {1, {random (255), g, b}};
336332
colour = {cloudColourHigh.colours[0], cloudColourHigh.colours[1],
337333
cloudColourHigh.colours[2], a};
338334
}

0 commit comments

Comments
 (0)