Add script hook onNewTurn to the end of AfterSwitchHedgehog. This should signal the very start of a new turn, immediately after CurrentTeam is switched.
authornemo
Tue, 07 Dec 2010 17:29:02 -0500 (2010-12-07)
changeset 4479 59e11a5a3bfa
parent 4477 63a21fac8bf7
child 4480 fcada5d38b3d
Add script hook onNewTurn to the end of AfterSwitchHedgehog. This should signal the very start of a new turn, immediately after CurrentTeam is switched.
hedgewars/uTeams.pas
--- a/hedgewars/uTeams.pas	Tue Dec 07 22:02:09 2010 +0300
+++ b/hedgewars/uTeams.pas	Tue Dec 07 17:29:02 2010 -0500
@@ -36,7 +36,7 @@
 procedure TeamGoneEffect(var Team: TTeam);
 
 implementation
-uses uLocale, uAmmos, uChat, uMobile, uVariables, uUtils, uIO, uCaptions, uCommands, uDebug;
+uses uLocale, uAmmos, uChat, uMobile, uVariables, uUtils, uIO, uCaptions, uCommands, uDebug, uScript;
 
 const MaxTeamHealth: LongInt = 0;
 
@@ -291,6 +291,7 @@
 
 CurrentTeam:= team;
 AddTeam:= team;
+ScriptCall('onNewTurn');
 end;
 
 procedure RecountAllTeamsHealth;