Ignore gmTimer after attack or hog is no longer controlled
authorWuzzy <Wuzzy2@mail.ru>
Wed, 19 Sep 2018 09:45:45 +0200
changeset 13792 5d46b4fae757
parent 13791 096cc009e0b8
child 13793 4e5fcfc6f033
Ignore gmTimer after attack or hog is no longer controlled You were able to set the timer after you threw a grenade
hedgewars/uGearsHedgehog.pas
--- a/hedgewars/uGearsHedgehog.pas	Wed Sep 19 09:31:06 2018 +0200
+++ b/hedgewars/uGearsHedgehog.pas	Wed Sep 19 09:45:45 2018 +0200
@@ -186,6 +186,9 @@
 Gear^.Message:= Gear^.Message and (not gmTimer);
 CurWeapon:= GetCurAmmoEntry(Gear^.Hedgehog^);
 with Gear^.Hedgehog^ do
+    if (((Gear^.State and gstAttacked) <> 0) and (GameFlags and gfInfAttack = 0))
+    or ((Gear^.State and gstHHDriven) = 0) then
+        exit;
     if ((Gear^.Message and gmPrecise) <> 0) and ((CurWeapon^.Propz and ammoprop_SetBounce) <> 0) then
         begin
         color:= Gear^.Hedgehog^.Team^.Clan^.Color;