mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user