hedgewars/uTeams.pas
changeset 14733 c760a2939b9c
parent 14656 db05d9bf7466
child 14734 e57c8ace7d96
equal deleted inserted replaced
14732:52916435d9b1 14733:c760a2939b9c
   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);
   739     if checkFails((Gear^.Health > 0) and (Gear^.Health <= cMaxHogHealth), 'Invalid hedgehog health (must be between 1 and '+IntToStr(cMaxHogHealth)+')', true) then exit;
   740     if checkFails((Gear^.Health > 0) and (Gear^.Health <= cMaxHogHealth), 'Invalid hedgehog health (must be between 1 and '+IntToStr(cMaxHogHealth)+')', true) then exit;
   740     if (GameFlags and gfSharedAmmo) <> 0 then
   741     if (GameFlags and gfSharedAmmo) <> 0 then
   741         CurrentHedgehog^.AmmoStore:= Clan^.ClanIndex
   742         CurrentHedgehog^.AmmoStore:= Clan^.ClanIndex
   742     else if (GameFlags and gfPerHogAmmo) <> 0 then
   743     else if (GameFlags and gfPerHogAmmo) <> 0 then
   743         begin
   744         begin