summaryrefslogtreecommitdiff
path: root/src/clientiface.cpp
diff options
context:
space:
mode:
authorJordan Snelling <jordach.snelling@gmail.com>2020-10-04 14:10:34 +0100
committerGitHub <noreply@github.com>2020-10-04 15:10:34 +0200
commit3068853e8a58ccc7370a5ce977c08223601c497a (patch)
tree07463fe9e41197a743bac3a4cea5d63c22402297 /src/clientiface.cpp
parent0f98b54aa4b2361575002d92b29fe222703ba557 (diff)
downloadminetest-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/clientiface.cpp')
-rw-r--r--src/clientiface.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/clientiface.cpp b/src/clientiface.cpp
index 602a44c90..28a0ee770 100644
--- a/src/clientiface.cpp
+++ b/src/clientiface.cpp
@@ -80,10 +80,11 @@ LuaEntitySAO *getAttachedObject(PlayerSAO *sao, ServerEnvironment *env)
int id;
std::string bone;
v3f dummy;
- sao->getAttachment(&id, &bone, &dummy, &dummy);
+ bool force_visible;
+ sao->getAttachment(&id, &bone, &dummy, &dummy, &force_visible);
ServerActiveObject *ao = env->getActiveObject(id);
while (id && ao) {
- ao->getAttachment(&id, &bone, &dummy, &dummy);
+ ao->getAttachment(&id, &bone, &dummy, &dummy, &force_visible);
if (id)
ao = env->getActiveObject(id);
}