hedgewars/uScript.pas
changeset 9174 d328fe17b195
parent 9173 575dd8fe4a55
child 9176 c21c88dca14c
--- a/hedgewars/uScript.pas	Thu Jun 06 03:35:59 2013 +0300
+++ b/hedgewars/uScript.pas	Thu Jun 06 03:52:32 2013 +0300
@@ -1323,6 +1323,13 @@
     lc_sendstat:= 0
 end;
 
+function lc_sendstatsoff(L : Plua_State) : LongInt; Cdecl;
+begin
+    L:= L; // avoid compiler hint
+    uStats.SendStatsOn := false;
+    lc_sendstatsoff:= 0
+end;
+
 function lc_sendstats(L : Plua_State) : LongInt; Cdecl;
 begin
     L:= L; // avoid compiler hint
@@ -2428,6 +2435,7 @@
 lua_register(luaState, _P'GetGearType', @lc_getgeartype);
 lua_register(luaState, _P'EndGame', @lc_endgame);
 lua_register(luaState, _P'SendStat', @lc_sendstat);
+lua_register(luaState, _P'SendStatsOff', @lc_sendstatsoff);
 lua_register(luaState, _P'SendStats', @lc_sendstats);
 lua_register(luaState, _P'FindPlace', @lc_findplace);
 lua_register(luaState, _P'SetGearPosition', @lc_setgearposition);