Engine:
authorsmxx
Wed, 10 Feb 2010 13:53:31 +0000
changeset 2792 a3efbf1c4500
parent 2791 ac4b69e5f9f7
child 2793 6bcf173ba9be
Engine: * Submit gear UID to script functions instead of gear pointer on gear add/delete
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Wed Feb 10 10:03:13 2010 +0000
+++ b/hedgewars/uGears.pas	Wed Feb 10 13:53:31 2010 +0000
@@ -425,7 +425,7 @@
 InsertGearToList(gear);
 AddGear:= gear;
 
-ScriptCall('onGearAdd', LongInt(gear));
+ScriptCall('onGearAdd', gear^.uid);
 end;
 
 procedure DeleteGear(Gear: PGear);
@@ -434,7 +434,7 @@
     k: boolean;
 begin
 
-ScriptCall('onGearDelete', LongInt(gear));
+ScriptCall('onGearDelete', gear^.uid);
 
 DeleteCI(Gear);