From c95b11b83a7cc38f25bbd0a3e6330b5d19931cbf Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Thu, 31 May 2012 20:04:32 +0000 Subject: cWorld::UnloadUnusedChunks() exported to Lua git-svn-id: http://mc-server.googlecode.com/svn/trunk@531 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Bindings.cpp | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'source/Bindings.cpp') diff --git a/source/Bindings.cpp b/source/Bindings.cpp index 4e60d38db..dae86cc26 100644 --- a/source/Bindings.cpp +++ b/source/Bindings.cpp @@ -1,6 +1,6 @@ /* ** Lua binding: AllToLua -** Generated automatically by tolua++-1.0.92 on 05/30/12 23:28:27. +** Generated automatically by tolua++-1.0.92 on 05/31/12 22:03:38. */ #ifndef __cplusplus @@ -9812,6 +9812,37 @@ static int tolua_AllToLua_cWorld_GetHeight00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE +/* method: UnloadUnusedChunks of class cWorld */ +#ifndef TOLUA_DISABLE_tolua_AllToLua_cWorld_UnloadUnusedChunks00 +static int tolua_AllToLua_cWorld_UnloadUnusedChunks00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"cWorld",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + cWorld* self = (cWorld*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'UnloadUnusedChunks'", NULL); +#endif + { + self->UnloadUnusedChunks(); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'UnloadUnusedChunks'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + /* method: GetMaxPlayers of class cWorld */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cWorld_GetMaxPlayers00 static int tolua_AllToLua_cWorld_GetMaxPlayers00(lua_State* tolua_S) @@ -18388,6 +18419,7 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"GetGameMode",tolua_AllToLua_cWorld_GetGameMode00); tolua_function(tolua_S,"SetWorldTime",tolua_AllToLua_cWorld_SetWorldTime00); tolua_function(tolua_S,"GetHeight",tolua_AllToLua_cWorld_GetHeight00); + tolua_function(tolua_S,"UnloadUnusedChunks",tolua_AllToLua_cWorld_UnloadUnusedChunks00); tolua_function(tolua_S,"GetMaxPlayers",tolua_AllToLua_cWorld_GetMaxPlayers00); tolua_function(tolua_S,"SetMaxPlayers",tolua_AllToLua_cWorld_SetMaxPlayers00); tolua_function(tolua_S,"GetNumPlayers",tolua_AllToLua_cWorld_GetNumPlayers00); -- cgit v1.2.3