Fix cursor still being visible after using piano strike
authorWuzzy <almikes@aol.com>
Wed, 11 Oct 2017 01:03:30 +0200
changeset 12687 ebb32d3021a5
parent 12686 d5e09024d722
child 12688 e095ed002652
Fix cursor still being visible after using piano strike
hedgewars/uConsts.pas
hedgewars/uIO.pas
hedgewars/uVariables.pas
--- a/hedgewars/uConsts.pas	Tue Oct 10 23:42:56 2017 +0200
+++ b/hedgewars/uConsts.pas	Wed Oct 11 01:03:30 2017 +0200
@@ -308,6 +308,7 @@
     ammoprop_DoesntStopTimerWhileAttackingInInfAttackMode
                           = $00100000;
     ammoprop_ForceTurnEnd = $00200000;
+    ammoprop_NoTargetAfter= $00400000;
     ammoprop_NoRoundEnd   = $10000000;
 
     AMMO_INFINITE = 100;
--- a/hedgewars/uIO.pas	Tue Oct 10 23:42:56 2017 +0200
+++ b/hedgewars/uIO.pas	Wed Oct 11 01:03:30 2017 +0200
@@ -477,7 +477,7 @@
     CurrentHedgehog^ do
     if (State and gstChooseTarget) <> 0 then
         begin
-        if CurAmmoType = amBee then
+        if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoTargetAfter) <> 0 then
             isCursorVisible:= false;
         if not CurrentTeam^.ExtDriven then
             begin
--- a/hedgewars/uVariables.pas	Tue Oct 10 23:42:56 2017 +0200
+++ b/hedgewars/uVariables.pas	Wed Oct 11 01:03:30 2017 +0200
@@ -922,6 +922,7 @@
             NumberInCase: 1;
             Ammo: (Propz: ammoprop_Power or
                           ammoprop_NeedTarget or
+                          ammoprop_NoTargetAfter or
                           ammoprop_DontHold or
                           ammoprop_NeedUpDown;
                 Count: 2;
@@ -1990,6 +1991,7 @@
             NumberInCase: 1;
             Ammo: (Propz: ammoprop_NoCrosshair or
                             ammoprop_NeedTarget or
+                            ammoprop_NoTargetAfter or
                             ammoprop_AttackingPut or
                             ammoprop_DontHold or
                             ammoprop_NotBorder or