# HG changeset patch
# User nemo
# Date 1269709407 0
# Node ID 3a3d1ee2ebd05ad8931b19c602464349495e3c02
# Parent  2829ea0dd47cf4529e2be1e0433f0116d7bd7a01
Tidier way to handle crosshair drawing. show/hide based on CurAmmoGear for alt attack weps

diff -r 2829ea0dd47c -r 3a3d1ee2ebd0 hedgewars/uAmmos.pas
--- a/hedgewars/uAmmos.pas	Sat Mar 27 16:57:18 2010 +0000
+++ b/hedgewars/uAmmos.pas	Sat Mar 27 17:03:27 2010 +0000
@@ -314,7 +314,10 @@
             Gear^.State:= Gear^.State and not gstHHChooseTarget;
             isCursorVisible:= false
             end;
-        ShowCrosshair:= (Propz and ammoprop_NoCrosshair) = 0
+        if (CurAmmoGear <> nil) and ((CurAmmoGear^.Ammo^.Propz and ammoprop_AltAttack) <> 0) then
+            ShowCrosshair:= (CurAmmoGear^.Ammo^.Propz and ammoprop_NoCrossHair) = 0
+        else
+            ShowCrosshair:= (Propz and ammoprop_NoCrosshair) = 0;
         end
     end
 end;
diff -r 2829ea0dd47c -r 3a3d1ee2ebd0 hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Sat Mar 27 16:57:18 2010 +0000
+++ b/hedgewars/uGears.pas	Sat Mar 27 17:03:27 2010 +0000
@@ -957,7 +957,7 @@
 if (Gear^.State and gstHHDriven) <> 0 then
     begin
     if ((Gear^.State and gstHHThinking) = 0) and
-       (ShowCrosshair or ((CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtRope))) and
+       ShowCrosshair and 
        ((Gear^.State and (gstAttacked or gstAnimation)) = 0) then
         begin
 (* These calculations are a little complex for a few reasons: