1
0

cWorld:ChunkStay() accepts nils as callbacks.

Also removed leftover debug logging.
This commit is contained in:
madmaxoft 2014-02-11 15:04:35 +01:00
parent 33c84aaa4d
commit a1e01ff725

View File

@ -1648,9 +1648,9 @@ static int tolua_cWorld_ChunkStay(lua_State * tolua_S)
cLuaState L(tolua_S); cLuaState L(tolua_S);
if ( if (
!L.CheckParamUserType(1, "cWorld") || !L.CheckParamUserType (1, "cWorld") ||
!L.CheckParamTable (2) || !L.CheckParamTable (2) ||
!L.CheckParamFunction(3, 4) !L.CheckParamFunctionOrNil(3, 4)
) )
{ {
return 0; return 0;
@ -1671,12 +1671,10 @@ static int tolua_cWorld_ChunkStay(lua_State * tolua_S)
L.LogStackTrace(); L.LogStackTrace();
return 0; return 0;
} }
L.LogStack("Before AddChunks()");
if (!ChunkStay->AddChunks(2)) if (!ChunkStay->AddChunks(2))
{ {
return 0; return 0;
} }
L.LogStack("After params read");
ChunkStay->Enable(*World->GetChunkMap(), 3, 4); ChunkStay->Enable(*World->GetChunkMap(), 3, 4);
return 0; return 0;