hedgewars/uGears.pas
changeset 2786 85f6425a4d74
parent 2771 477957a89881
child 2790 83630d5f94db
--- a/hedgewars/uGears.pas	Tue Feb 09 21:51:52 2010 +0000
+++ b/hedgewars/uGears.pas	Wed Feb 10 00:55:40 2010 +0000
@@ -91,7 +91,7 @@
 
 implementation
 uses uWorld, uMisc, uStore, uConsole, uSound, uTeams, uRandom, uCollisions, uLand, uIO, uLandGraphics,
-	uAIMisc, uLocale, uAI, uAmmos, uTriggers, uStats, uVisualGears,
+	uAIMisc, uLocale, uAI, uAmmos, uTriggers, uStats, uVisualGears, uScript, 
 {$IFDEF GLES11}
 	gles11;
 {$ELSE}
@@ -423,6 +423,8 @@
      end;
 InsertGearToList(gear);
 AddGear:= gear;
+
+ScriptCall('onGearAdd', LongInt(gear));
 end;
 
 procedure DeleteGear(Gear: PGear);
@@ -430,6 +432,9 @@
 	t,i: Longword;
     k: boolean;
 begin
+
+ScriptCall('onGearDelete', LongInt(gear));
+
 DeleteCI(Gear);
 
 if Gear^.Tex <> nil then