mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix camera:get_offset() in CSM
This commit is contained in:
parent
b57dc70769
commit
682b9de824
1 changed files with 3 additions and 4 deletions
|
@ -108,11 +108,10 @@ int LuaCamera::l_get_pos(lua_State *L)
|
||||||
|
|
||||||
int LuaCamera::l_get_offset(lua_State *L)
|
int LuaCamera::l_get_offset(lua_State *L)
|
||||||
{
|
{
|
||||||
Camera *camera = getobject(L, 1);
|
LocalPlayer *player = getClient(L)->getEnv().getLocalPlayer();
|
||||||
if (!camera)
|
sanity_check(player);
|
||||||
return 0;
|
|
||||||
|
|
||||||
push_v3s16(L, camera->getOffset());
|
push_v3f(L, player->getEyeOffset() / BS);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue