Implemented World::probe_lua_call and tested
This commit is contained in:
@@ -171,7 +171,7 @@ std::optional<util::DXYZ> LuaCoreStack::tryxyz(LuaSlot s) const {
|
||||
lua_rawgeti(L_, s, 3);
|
||||
lua_rawgeti(L_, s, 2);
|
||||
lua_rawgeti(L_, s, 1);
|
||||
if (lua_isnumber(L_, -1) && lua_isnumber(L_, -2) && lua_isnumber(L_, -3)) {
|
||||
if ((lua_type(L_, -1)==LUA_TNUMBER) && (lua_type(L_, -2)==LUA_TNUMBER) && (lua_type(L_, -3)==LUA_TNUMBER)) {
|
||||
util::DXYZ result;
|
||||
result.x = lua_tonumber(L_, -1);
|
||||
result.y = lua_tonumber(L_, -2);
|
||||
|
||||
Reference in New Issue
Block a user