diff options
author | Jordan Snelling <jordach.snelling@gmail.com> | 2020-10-04 14:10:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-04 15:10:34 +0200 |
commit | 3068853e8a58ccc7370a5ce977c08223601c497a (patch) | |
tree | 07463fe9e41197a743bac3a4cea5d63c22402297 /src/script/lua_api/l_camera.cpp | |
parent | 0f98b54aa4b2361575002d92b29fe222703ba557 (diff) | |
download | minetest-3068853e8a58ccc7370a5ce977c08223601c497a.tar.gz minetest-3068853e8a58ccc7370a5ce977c08223601c497a.tar.bz2 minetest-3068853e8a58ccc7370a5ce977c08223601c497a.zip |
Add First Person Attachments (#10360)
Fixes some other third person camera specific attachments.
Implements a single new flag for entities to be forced visible in first person mode.
Old mods do not need to be updated to use the new flag and are fully backwards compatible.
Diffstat (limited to 'src/script/lua_api/l_camera.cpp')
-rw-r--r-- | src/script/lua_api/l_camera.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/script/lua_api/l_camera.cpp b/src/script/lua_api/l_camera.cpp index bfa60be67..40251154c 100644 --- a/src/script/lua_api/l_camera.cpp +++ b/src/script/lua_api/l_camera.cpp @@ -63,7 +63,8 @@ int LuaCamera::l_set_camera_mode(lua_State *L) return 0; camera->setCameraMode((CameraMode)((int)lua_tonumber(L, 2))); - playercao->setVisible(camera->getCameraMode() > CAMERA_MODE_FIRST); + // Make the player visible depending on camera mode. + playercao->updateMeshCulling(); playercao->setChildrenVisible(camera->getCameraMode() > CAMERA_MODE_FIRST); return 0; } |