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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user