From 3a72e5f8ed2fe8cb57d28ba9ee8aab34f4ac4df2 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 9 Aug 2015 16:41:00 +0200 Subject: [PATCH] Fix addColorParticles() when color is not -1. This only is used when ENT_PARTICLETRAIL is set, which might actually not be used anywhere. --- src/particles.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/particles.cpp b/src/particles.cpp index 942a79d..66595ab 100644 --- a/src/particles.cpp +++ b/src/particles.cpp @@ -63,16 +63,15 @@ void addColorParticles(float x, float y, int amount, int color) for (int i = 0 ; i < amount ; i++) { if (color == -1) - { c = Math::prand() % 5; - switch (c) - { - case 0: c = graphics.white; break; - case 1: c = graphics.grey; break; - case 2: c = graphics.blue; break; - case 3: c = graphics.cyan; break; - case 4: c = graphics.red; break; - } + + switch (c) + { + case 0: c = graphics.white; break; + case 1: c = graphics.grey; break; + case 2: c = graphics.blue; break; + case 3: c = graphics.cyan; break; + case 4: c = graphics.red; break; } dx = Math::rrand(-30, 30); dx /= 30; -- 2.39.5