hedgewars/HHHandlers.inc
changeset 5031 e26f430be1ed
parent 5026 e83d4552625f
child 5034 a30772158f50
--- a/hedgewars/HHHandlers.inc	Sun Mar 20 08:42:32 2011 +0000
+++ b/hedgewars/HHHandlers.inc	Sun Mar 20 12:52:36 2011 -0400
@@ -90,7 +90,14 @@
         if i <= cMaxSlotAmmoIndex then ammoidx:= i
         else ammoidx:= -1
         end;
-        if ammoidx >= 0 then CurAmmoType:= Ammo^[slot, ammoidx].AmmoType;
+        if ammoidx >= 0 then 
+            begin
+            CurAmmoType:= Ammo^[slot, ammoidx].AmmoType;
+            if (CurAmmoGear <> nil) and ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0) then
+                ShowCrosshair:= (Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_NoCrossHair) = 0
+            else
+                ShowCrosshair:= (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoCrosshair) = 0;
+            end
     end
 end;
 
@@ -385,6 +392,10 @@
                 TurnTimeLeft:=round(Ammoz[a].TimeAfterTurn * (cGetAwayTime / 100));
                 end;
             if ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEnd) = 0) then State:= State or gstAttacked;
+            if (CurAmmoGear <> nil) and ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0) then
+                ShowCrosshair:= (Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_NoCrossHair) = 0
+            else
+                ShowCrosshair:= (Ammoz[a].Ammo.Propz and ammoprop_NoCrosshair) = 0;
             if (Ammoz[a].Ammo.Propz and ammoprop_NoRoundEnd) <> 0 then ApplyAmmoChanges(CurrentHedgehog^)
             end;
         end