# HG changeset patch # User nemo # Date 1386129225 18000 # Node ID 443d233316e539db080c79c4af8bd2052c3d324f # Parent b0286b0c91ce919f945e98941e6b5df7b53c3d62 make the team association with hog before calling gear creation. makes some lua a little easier diff -r b0286b0c91ce -r 443d233316e5 hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Tue Dec 03 22:48:21 2013 -0500 +++ b/hedgewars/uTeams.pas Tue Dec 03 22:53:45 2013 -0500 @@ -542,11 +542,11 @@ SplitBySpace(id, s); SwitchCurrentHedgehog(@Hedgehogs[HedgehogsNumber]); CurrentHedgehog^.BotLevel:= StrToInt(id); + CurrentHedgehog^.Team:= CurrentTeam; Gear:= AddGear(0, 0, gtHedgehog, 0, _0, _0, 0); SplitBySpace(s, id); Gear^.Health:= StrToInt(s); TryDo(Gear^.Health > 0, 'Invalid hedgehog health', true); - Gear^.Hedgehog^.Team:= CurrentTeam; if (GameFlags and gfSharedAmmo) <> 0 then CurrentHedgehog^.AmmoStore:= Clan^.ClanIndex else if (GameFlags and gfPerHogAmmo) <> 0 then