hedgewars/uGearsHandlersMess.pas
changeset 14125 7bb0e27910aa
parent 14084 a173557250a3
child 14201 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