hedgewars/GSHandlers.inc
changeset 8906 82756a90a343
parent 8838 aa2ffd427f6a
child 8924 13ac59499066
--- a/hedgewars/GSHandlers.inc	Thu Apr 11 23:20:56 2013 +0400
+++ b/hedgewars/GSHandlers.inc	Fri Apr 12 12:44:14 2013 -0400
@@ -417,14 +417,13 @@
     CalcRotationDirAngle(Gear);
 
     // let's add some smoke depending on speed
-    s:= max(32,152 - hwRound(Distance(Gear^.dX,Gear^.dY)*120))+random(10);
+    s:= max(32,152 - round((abs(hwFloat2FLoat(Gear^.dX))+abs(hwFloat2Float(Gear^.dY)))*120))+random(10);
     if (GameTicks mod s) = 0 then
         begin
         // adjust angle to match the texture
         if Gear^.dX.isNegative then
-            i:= 130
-        else
-            i:= 50;
+             i:= 130
+        else i:= 50;
 
         smoke:= AddVisualGear(hwRound(Gear^.X)-round(cos((Gear^.DirAngle+i) * pi / 180)*20), hwRound(Gear^.Y)-round(sin((Gear^.DirAngle+i) * pi / 180)*20), vgtSmoke);
         if smoke <> nil then