hedgewars/uGearsHandlersMess.pas
changeset 14141 7bb0e27910aa
parent 14100 a173557250a3
child 14217 ab5e710d353d
--- 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