Fix portal color being switchable after losing control
authorWuzzy <Wuzzy2@mail.ru>
Sat, 03 Nov 2018 17:40:21 +0100
changeset 14120 7bb0e27910aa
parent 14119 90fd4f3d01e3
child 14121 69db1d2e4cec
Fix portal color being switchable after losing control
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Sat Nov 03 16:37:27 2018 +0100
+++ b/hedgewars/uGearsHandlersMess.pas	Sat Nov 03 17:40:21 2018 +0100
@@ -4736,7 +4736,7 @@
 procedure doPortalColorSwitch();
 var CurWeapon: PAmmo;
 begin
-    if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and ((CurrentHedgehog^.Gear^.Message and gmSwitch) <> 0) then
+    if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and ((CurrentHedgehog^.Gear^.State and gstHHDriven) <> 0) and ((CurrentHedgehog^.Gear^.Message and gmSwitch) <> 0) then
             with CurrentHedgehog^ do
                 if (CurAmmoType = amPortalGun) then
                     begin