]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
rain: also draw rain when fps are high :P
authorRudolf Polzer <divverent@xonotic.org>
Sat, 19 Nov 2011 14:48:02 +0000 (15:48 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Sat, 19 Nov 2011 14:48:02 +0000 (15:48 +0100)
qcsrc/client/particles.qc

index b7233eee14b8c1a5e29a21b1e22b6c59c7584664..6e24893b02e005b08d9b3e142dad4d70e6c1efd7 100644 (file)
@@ -191,12 +191,12 @@ void Ent_PointParticles()
 .float glow_color; // palette index
 void Draw_Rain()
 {
-    te_particlerain(self.origin + self.mins, self.origin + self.maxs, self.velocity, self.count * drawframetime, self.glow_color);
+    te_particlerain(self.origin + self.mins, self.origin + self.maxs, self.velocity, floor(self.count * drawframetime + random()), self.glow_color);
 }
 
 void Draw_Snow()
 {
-    te_particlesnow(self.origin + self.mins, self.origin + self.maxs, self.velocity, self.count * drawframetime, self.glow_color);
+    te_particlesnow(self.origin + self.mins, self.origin + self.maxs, self.velocity, floor(self.count * drawframetime + random()), self.glow_color);
 }
 
 void Ent_RainOrSnow()