Skip to content
Permalink
Browse files

Fix camera:get_offset() in CSM

  • Loading branch information
sfan5 committed Nov 8, 2019
1 parent b57dc70 commit 682b9de8246ce2c620f1cc5e4212e6378c2301ae
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/script/lua_api/l_camera.cpp
@@ -108,11 +108,10 @@ int LuaCamera::l_get_pos(lua_State *L)

int LuaCamera::l_get_offset(lua_State *L)
{
Camera *camera = getobject(L, 1);
if (!camera)
return 0;
LocalPlayer *player = getClient(L)->getEnv().getLocalPlayer();
sanity_check(player);

push_v3s16(L, camera->getOffset());
push_v3f(L, player->getEyeOffset() / BS);
return 1;
}

0 comments on commit 682b9de

Please sign in to comment.
You can’t perform that action at this time.