hedgewars/uTeams.pas
changeset 14754 c760a2939b9c
parent 14677 db05d9bf7466
child 14755 e57c8ace7d96
equal deleted inserted replaced
14753:52916435d9b1 14754: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