hedgewars/uGearsHandlersMess.pas
changeset 14120 7bb0e27910aa
parent 14079 a173557250a3
child 14196 ab5e710d353d
equal deleted inserted replaced
14119:90fd4f3d01e3 14120:7bb0e27910aa
  4734 
  4734 
  4735 ////////////////////////////////////////////////////////////////////////////////
  4735 ////////////////////////////////////////////////////////////////////////////////
  4736 procedure doPortalColorSwitch();
  4736 procedure doPortalColorSwitch();
  4737 var CurWeapon: PAmmo;
  4737 var CurWeapon: PAmmo;
  4738 begin
  4738 begin
  4739     if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and ((CurrentHedgehog^.Gear^.Message and gmSwitch) <> 0) then
  4739     if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and ((CurrentHedgehog^.Gear^.State and gstHHDriven) <> 0) and ((CurrentHedgehog^.Gear^.Message and gmSwitch) <> 0) then
  4740             with CurrentHedgehog^ do
  4740             with CurrentHedgehog^ do
  4741                 if (CurAmmoType = amPortalGun) then
  4741                 if (CurAmmoType = amPortalGun) then
  4742                     begin
  4742                     begin
  4743                     PlaySound(sndPortalSwitch);
  4743                     PlaySound(sndPortalSwitch);
  4744                     CurrentHedgehog^.Gear^.Message := CurrentHedgehog^.Gear^.Message and (not gmSwitch);
  4744                     CurrentHedgehog^.Gear^.Message := CurrentHedgehog^.Gear^.Message and (not gmSwitch);