Add SinguFollowDistance for setting minimum follow distance

This commit is contained in:
Liru Færs
2020-01-07 18:51:49 -05:00
parent dfe8e364be
commit 760f1308f3
2 changed files with 13 additions and 2 deletions

View File

@@ -917,6 +917,17 @@
<key>Value</key>
<real>0</real>
</map>
<key>SinguFollowDistance</key>
<map>
<key>Comment</key>
<string>Distance at which to follow objects and avatars at, from menus that offer follow (minimum 0.5)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<string>1.0</string>
</map>
<key>SinguLastKnownReleaseBuild</key>
<map>
<key>Comment</key>

View File

@@ -2516,7 +2516,7 @@ class LLObjectFollow : public view_listener_t
{
if (auto av = objectp->getAvatarAncestor()) // Follow the avatar, not a control avatar or an attachment, if possible
objectp = av;
gAgent.startFollowPilot(objectp->getID(), true, 1.0f);
gAgent.startFollowPilot(objectp->getID(), true, gSavedSettings.getF32("SinguFollowDistance"));
}
return true;
}
@@ -9412,7 +9412,7 @@ class ListFollow : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
gAgent.startFollowPilot(LFIDBearer::getActiveSelectedID(), true, 1.0f);
gAgent.startFollowPilot(LFIDBearer::getActiveSelectedID(), true, gSavedSettings.getF32("SinguFollowDistance"));
return true;
}
};