From: Guus Sliepen Date: Sun, 9 Aug 2015 14:41:00 +0000 (+0200) Subject: Fix addColorParticles() when color is not -1. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3a72e5f8ed2fe8cb57d28ba9ee8aab34f4ac4df2;p=quix0rs-blobwars.git Fix addColorParticles() when color is not -1. This only is used when ENT_PARTICLETRAIL is set, which might actually not be used anywhere. --- 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;