hedgewars/uTeams.pas
changeset 14734 e57c8ace7d96
parent 14733 c760a2939b9c
child 14931 ba5fd934f49b
equal deleted inserted replaced
14733:c760a2939b9c 14734:e57c8ace7d96
   734     CurrentHedgehog^.BotLevel:= StrToInt(id);
   734     CurrentHedgehog^.BotLevel:= StrToInt(id);
   735     CurrentHedgehog^.Team:= CurrentTeam;
   735     CurrentHedgehog^.Team:= CurrentTeam;
   736     Gear:= AddGear(0, 0, gtHedgehog, 0, _0, _0, 0);
   736     Gear:= AddGear(0, 0, gtHedgehog, 0, _0, _0, 0);
   737     SplitBySpace(s, id);
   737     SplitBySpace(s, id);
   738     Gear^.Health:= StrToInt(s);
   738     Gear^.Health:= StrToInt(s);
   739     Gear^.Pos:= GetRandom(19);
       
   740     if checkFails((Gear^.Health > 0) and (Gear^.Health <= cMaxHogHealth), 'Invalid hedgehog health (must be between 1 and '+IntToStr(cMaxHogHealth)+')', true) then exit;
   739     if checkFails((Gear^.Health > 0) and (Gear^.Health <= cMaxHogHealth), 'Invalid hedgehog health (must be between 1 and '+IntToStr(cMaxHogHealth)+')', true) then exit;
   741     if (GameFlags and gfSharedAmmo) <> 0 then
   740     if (GameFlags and gfSharedAmmo) <> 0 then
   742         CurrentHedgehog^.AmmoStore:= Clan^.ClanIndex
   741         CurrentHedgehog^.AmmoStore:= Clan^.ClanIndex
   743     else if (GameFlags and gfPerHogAmmo) <> 0 then
   742     else if (GameFlags and gfPerHogAmmo) <> 0 then
   744         begin
   743         begin