projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b57dc70
)
Fix camera:get_offset() in CSM
author
sfan5
<sfan5@live.de>
Fri, 8 Nov 2019 23:27:50 +0000
(
00:27
+0100)
committer
sfan5
<sfan5@live.de>
Mon, 11 Nov 2019 13:06:48 +0000
(14:06 +0100)
src/script/lua_api/l_camera.cpp
patch
|
blob
|
history
diff --git
a/src/script/lua_api/l_camera.cpp
b/src/script/lua_api/l_camera.cpp
index 80071b3b8f2f3b8a256624da04230617735074d4..9c1470284645c5811e8172f411d6588716be26ec 100644
(file)
--- a/
src/script/lua_api/l_camera.cpp
+++ b/
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_v3
s16(L, camera->getOffset()
);
+ push_v3
f(L, player->getEyeOffset() / BS
);
return 1;
}