I see no reason why a visual effect needs Distance. IMO square should look just fine. Untested. Oh. Also reduced flake count at Randi's request.
authornemo
Fri, 12 Apr 2013 12:44:14 -0400
changeset 8906 82756a90a343
parent 8905 82b1400f4a08
child 8907 7e9c6efe90fd
I see no reason why a visual effect needs Distance. IMO square should look just fine. Untested. Oh. Also reduced flake count at Randi's request.
hedgewars/GSHandlers.inc
share/hedgewars/Data/Themes/Fruit/theme.cfg
--- 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
--- a/share/hedgewars/Data/Themes/Fruit/theme.cfg	Thu Apr 11 23:20:56 2013 +0400
+++ b/share/hedgewars/Data/Themes/Fruit/theme.cfg	Fri Apr 12 12:44:14 2013 -0400
@@ -10,4 +10,4 @@
 object = Watermelon, 1, 87, 272, 77, 10, 1, 21, 2, 242, 219
 object = Banana1, 1, 152, 191, 37, 24, 1, 2, 1, 163, 174
 object = Banana2, 1, 1, 190, 37, 24, 1, 22, 0, 163, 174
-flakes = 40, 3, 999999999, 100, 260
+flakes = 20, 3, 999999999, 100, 260