hedgewars/GSHandlers.inc
changeset 5873 4f2d8ce3732b
parent 5871 09daa06191d7
child 5874 5cd329cf2460
--- a/hedgewars/GSHandlers.inc	Sun Sep 11 21:32:49 2011 -0400
+++ b/hedgewars/GSHandlers.inc	Mon Sep 12 06:31:10 2011 +0200
@@ -523,7 +523,9 @@
     i:= max(32,152 - hwRound(Distance(Gear^.dX,Gear^.dY)*120))+random(10);
     if (GameTicks mod i) = 0 then
         begin
-        smoke:= AddVisualGear(hwRound(Gear^.X)-round(cos((Gear^.DirAngle+50) * pi / 180)*20), hwRound(Gear^.Y)-round(sin((Gear^.DirAngle+50) * pi / 180)*20), vgtSmoke);
+        // adjust angle to match the texture
+        if Gear^.dX.isNegative then 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 smoke^.Scale:= 0.75;
         end;