IsHogLocal: If there's a mission team, only count members in the clan of that team
This attends to a hack in some missions which use fake human teams in the enemy clans for animation purposes.
--- a/ChangeLog.txt Sun May 26 14:16:35 2019 +0200
+++ b/ChangeLog.txt Sun May 26 14:27:55 2019 +0200
@@ -177,6 +177,7 @@
* Fix DismissTeam not clearing team properly
* SimpleMission: Fix Lua error spam when a custom goal fails
* gstWinner state is preserved after the game ended
+ * If there's a mission team IsHogLocal now only returns true for hogs in the same clan as the mission team
====================== 0.9.25 ======================
HIGHLIGHTS:
--- a/hedgewars/uTeams.pas Sun May 26 14:16:35 2019 +0200
+++ b/hedgewars/uTeams.pas Sun May 26 14:27:55 2019 +0200
@@ -563,7 +563,8 @@
begin
if (not ExtDriven) and (Hedgehogs[0].BotLevel = 0) then
begin
- Clan^.LocalOrAlly:= true;
+ if (MissionTeam = nil) or (MissionTeam^.TeamName = TeamName) then
+ Clan^.LocalOrAlly:= true;
LocalTeam:= t;
LocalAmmo:= Hedgehogs[0].AmmoStore
end;