--- a/hedgewars/uVisualGearsList.pas Tue Nov 15 00:17:31 2016 +0100
+++ b/hedgewars/uVisualGearsList.pas Tue Nov 15 00:42:44 2016 +0100
@@ -36,7 +36,7 @@
VisualGearLayers: array[0..6] of PVisualGear;
implementation
-uses uCollisions, uFloat, uVariables, uConsts, uTextures, uVisualGearsHandlers;
+uses uCollisions, uFloat, uVariables, uConsts, uTextures, uVisualGearsHandlers, uScript;
function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType): PVisualGear; inline;
begin
@@ -437,10 +437,12 @@
VisualGearLayers[gear^.Layer]:= gear;
AddVisualGear:= gear;
+ScriptCall('onVisualGearAdd', gear^.uid);
end;
procedure DeleteVisualGear(Gear: PVisualGear);
begin
+ ScriptCall('onVisualGearDelete', Gear^.uid);
FreeAndNilTexture(Gear^.Tex);
if Gear^.NextGear <> nil then