--- a/ChangeLog.txt Thu May 16 19:44:27 2019 +0200
+++ b/ChangeLog.txt Thu May 16 20:31:41 2019 +0200
@@ -135,6 +135,7 @@
+ Utils library: New calls: getReadableChallengeRecord, updateChallengeRecord, integerSqrt, integerHypotenuse
+ New callback: onGameResult(winningClan): Called when the game ends normally. winningClan = index of winning clan or -1 on draw
+ New callback: onCaseDrop(gear): Called at the point where a crate MIGHT be dropped between turns. Gear is the crate gear or nil
+ + New callback: ooHogSwitch(oldHog): Called when hogs was switched with the “switch hedgehog” utility
+ New callback: onPreciseLocal(): Called when precise key is pressed client-side
+ SendStat extension: Option to use predefined modes with siPointType, like "!POINTS" or "!TIME"
+ SimpleMission: Add isMissionTeam attribute for teams
--- a/hedgewars/uGearsHandlersMess.pas Thu May 16 19:44:27 2019 +0200
+++ b/hedgewars/uGearsHandlersMess.pas Thu May 16 20:31:41 2019 +0200
@@ -3338,6 +3338,7 @@
hedgehog: PHedgehog;
State: Longword;
switchDir: Longword;
+ oldUid: Longword;
begin
AllInactive := false;
@@ -3355,6 +3356,7 @@
if (Gear^.Message and gmSwitch) <> 0 then
begin
HHGear := CurrentHedgehog^.Gear;
+ oldUid:= HHGear^.uid;
HHGear^.Message := HHGear^.Message and (not gmSwitch);
Gear^.Message := Gear^.Message and (not gmSwitch);
@@ -3387,6 +3389,7 @@
AmmoMenuInvalidated:= true;
HHGear := CurrentHedgehog^.Gear;
+ ScriptCall('onHogSwitch', oldUid);
HHGear^.State := State;
HHGear^.Active := true;
FollowGear := HHGear;