# HG changeset patch # User unc0rr # Date 1308660124 -14400 # Node ID 1b408b965c01eac67c6f954b73a8f822340f89cc # Parent f2e31a7f953a8956b0bdc36fadfdf31c2f664c89 Don't stick to enemies when there are more than 2 clans diff -r f2e31a7f953a -r 1b408b965c01 hedgewars/uAIMisc.pas --- a/hedgewars/uAIMisc.pas Tue Jun 14 16:50:41 2011 -0400 +++ b/hedgewars/uAIMisc.pas Tue Jun 21 16:42:04 2011 +0400 @@ -134,7 +134,7 @@ Gear:= GearsList; while Gear <> nil do begin - if (filter = []) or (Gear^.Kind in filter) then + if (filter = []) or (Gear^.Kind in filter) then case Gear^.Kind of gtCase: AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 33, 25); gtFlame: if (Gear^.State and gsttmpFlag) <> 0 then @@ -152,7 +152,7 @@ AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 60, -25) else if isAfterAttack and (ThinkingHH^.Hedgehog <> Gear^.Hedgehog) then - if (MyClan = Gear^.Hedgehog^.Team^.Clan) then + if (ClansCount > 2) or (MyClan = Gear^.Hedgehog^.Team^.Clan) then AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 150, -3) // hedgehog-friend else AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 100, 3)