hedgewars/uGears.pas
changeset 3496 8fb007d36c09
parent 3485 ab91c56a9050
child 3499 66eba4e41b91
--- a/hedgewars/uGears.pas	Sat Jun 05 14:07:58 2010 +0000
+++ b/hedgewars/uGears.pas	Sat Jun 05 18:50:08 2010 +0000
@@ -130,7 +130,7 @@
 
 function GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
 begin
-    GetLaunchX:= dir * (8 + hwRound(AngleSin(angle) * Ammoz[at].ejectX) + hwRound(AngleCos(angle) * Ammoz[at].ejectY))
+    GetLaunchX:= sign(dir) * (8 + hwRound(AngleSin(angle) * Ammoz[at].ejectX) + hwRound(AngleCos(angle) * Ammoz[at].ejectY))
 end;
 
 function GetLaunchY(at: TAmmoType; angle: LongInt): LongInt;