hedgewars/uTeams.pas
changeset 14945 8b848c2939da
parent 14936 ba5fd934f49b
child 15057 1a754860b0e5
equal deleted inserted replaced
14944:7b597da60fda 14945:8b848c2939da
   712     SplitBySpace(s, id);
   712     SplitBySpace(s, id);
   713     Health:= StrToInt(s);
   713     Health:= StrToInt(s);
   714     if checkFails((Health > 0) and (Health <= cMaxHogHealth), 'Invalid hedgehog health (must be between 1 and '+IntToStr(cMaxHogHealth)+')', true) then exit;
   714     if checkFails((Health > 0) and (Health <= cMaxHogHealth), 'Invalid hedgehog health (must be between 1 and '+IntToStr(cMaxHogHealth)+')', true) then exit;
   715     CurrentHedgehog^.Name:= id;
   715     CurrentHedgehog^.Name:= id;
   716     CurrentHedgehog^.InitialHealth:= Health;
   716     CurrentHedgehog^.InitialHealth:= Health;
       
   717     CurrentHedgehog^.RevengeHog:= nil;
   717     inc(HedgehogsNumber)
   718     inc(HedgehogsNumber)
   718     end
   719     end
   719 end;
   720 end;
   720 
   721 
   721 procedure chAddHH(var id: shortstring);
   722 procedure chAddHH(var id: shortstring);
   747     else CurrentHedgehog^.AmmoStore:= TeamsCount - 1;
   748     else CurrentHedgehog^.AmmoStore:= TeamsCount - 1;
   748     CurrentHedgehog^.Gear:= Gear;
   749     CurrentHedgehog^.Gear:= Gear;
   749     CurrentHedgehog^.Name:= id;
   750     CurrentHedgehog^.Name:= id;
   750     CurrentHedgehog^.InitialHealth:= Gear^.Health;
   751     CurrentHedgehog^.InitialHealth:= Gear^.Health;
   751     CurrentHedgehog^.RevengeHog:= nil;
   752     CurrentHedgehog^.RevengeHog:= nil;
       
   753     CurrentHedgehog^.FlownOffMap:= false;
   752     CurrHedgehog:= HedgehogsNumber;
   754     CurrHedgehog:= HedgehogsNumber;
   753     inc(HedgehogsNumber)
   755     inc(HedgehogsNumber)
   754     end
   756     end
   755 end;
   757 end;
   756 
   758