hedgewars/uScript.pas
changeset 2794 befd3808c63a
parent 2793 6bcf173ba9be
child 2795 c9c830897547
--- a/hedgewars/uScript.pas	Wed Feb 10 15:42:00 2010 +0000
+++ b/hedgewars/uScript.pas	Wed Feb 10 17:13:49 2010 +0000
@@ -209,8 +209,7 @@
 		begin
 		ParseCommand('addhh ' + lua_tostring(L, 2) + ' ' + lua_tostring(L, 3) + ' ' + lua_tostring(L, 1), true);
 		ParseCommand('hat ' + lua_tostring(L, 4), true);
-		WriteLnToConsole('last hog: ' + inttostr(LongInt(CurrentHedgehog)));
-		lua_pushinteger(L, LongInt(CurrentHedgehog^.Gear));
+		lua_pushinteger(L, CurrentHedgehog^.Gear^.uid);
 		end;
 	lc_addhog:= 1;
 end;