cLuaState: Added template to push multiple values in a single call. (#3331)

This commit is contained in:
Mattes D
2016-08-21 11:03:10 +02:00
committed by GitHub
parent 2f11655f00
commit d4aff474c2
4 changed files with 23 additions and 44 deletions
+3 -10
View File
@@ -296,10 +296,7 @@ static int tolua_cWorld_GetBlockInfo(lua_State * tolua_S)
L.Push(res);
if (res)
{
L.Push(BlockType);
L.Push(BlockMeta);
L.Push(BlockSkyLight);
L.Push(BlockBlockLight);
L.Push(BlockType, BlockMeta, BlockSkyLight, BlockBlockLight);
return 5;
}
return 1;
@@ -345,8 +342,7 @@ static int tolua_cWorld_GetBlockTypeMeta(lua_State * tolua_S)
L.Push(res);
if (res)
{
L.Push(BlockType);
L.Push(BlockMeta);
L.Push(BlockType, BlockMeta);
return 3;
}
return 1;
@@ -390,10 +386,7 @@ static int tolua_cWorld_GetSignLines(lua_State * tolua_S)
L.Push(res);
if (res)
{
L.Push(Line1);
L.Push(Line2);
L.Push(Line3);
L.Push(Line4);
L.Push(Line1, Line2, Line3, Line4);
return 5;
}
return 1;