hedgewars/uTouch.pas
changeset 7105 9007531f813f
parent 7087 d2089f2ea5af
child 7185 92a045156255
equal deleted inserted replaced
7104:2468316c1d9d 7105:9007531f813f
   269             if(Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0)then
   269             if(Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0)then
   270                 begin
   270                 begin
   271                 ParseTeamCommand('put');
   271                 ParseTeamCommand('put');
   272                 targetted:= true;
   272                 targetted:= true;
   273                 end
   273                 end
   274             else if CurAmmoGear^.AmmoType = amSwitch then
   274             else if (CurAmmoGear <> nil) and (CurAmmoGear^.AmmoType = amSwitch) then
   275                 ParseTeamCommand('switch')
   275                 ParseTeamCommand('switch')
   276             else WriteLnToConsole(inttostr(ord(Ammoz[CurrentHedgehog^.CurAmmoType].NameId)) + ' ' + inttostr(ord(sidSwitch)));
   276             else WriteLnToConsole(inttostr(ord(Ammoz[CurrentHedgehog^.CurAmmoType].NameId)) + ' ' + inttostr(ord(sidSwitch)));
   277     end;
   277     end;
   278         
   278         
   279 if targetting then
   279 if targetting then