FIRE-12004: Extended experimental fix for attachments getting lost on TP
Apparently some recent server side change causes kill object messages for attachments sometimes being sent after the TP has technically finished already. Currently the experimental fix doesn't cover that case because the TP state would already be TELEPORT_NONE. To handle this new failure case, resort to introducing a timer (yuck!) that will prevent attachments from being detached temporarily after a TP has finished. This basically has the same effect of enabling TP progress screens, as it delays the finalization of TP for 2 seconds, which often seem to be enough time prevent attachments from being detached. For now, set the timer to prevent attachments being detached after TP to 3 seconds to test how it works out. This not only affects attachments being falsely detached by the region, but also prevents manual detaching during this period immediately after a TP. The delay of this new timer can be configured via FSExperimentalLostAttachmentsFixKillDelay debug setting.master
parent
e94cf15422
commit
4e3fba3cfd
|
|
@ -24527,6 +24527,17 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>FSExperimentalLostAttachmentsFixKillDelay</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Delay in seconds after a teleport for that kill object messages to detach attachments are being ignored.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<integer>3.0</integer>
|
||||
</map>
|
||||
<key>FSExperimentalLostAttachmentsFixReport</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -98,6 +98,8 @@ const F32 RESTORE_GL_TIME = 5.f; // Wait this long while reloading textures bef
|
|||
// <FS:Ansariel> Draw Distance stepping; originally based on SpeedRez by Henri Beauchamp, licensed under LGPL
|
||||
F32 gSavedDrawDistance = 0.0f;
|
||||
F32 gLastDrawDistanceStep = 0.0f;
|
||||
// <FS:Ansariel> FIRE-12004: Attachments getting lost on TP
|
||||
LLFrameTimer gPostTeleportFinishKillObjectDelayTimer;
|
||||
|
||||
BOOL gForceRenderLandFence = FALSE;
|
||||
BOOL gDisplaySwapBuffers = FALSE;
|
||||
|
|
@ -532,6 +534,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
|||
{
|
||||
gAgentCamera.resetView(TRUE, TRUE);
|
||||
}
|
||||
|
||||
// <FS:Ansariel> FIRE-12004: Attachments getting lost on TP
|
||||
gPostTeleportFinishKillObjectDelayTimer.reset();
|
||||
break;
|
||||
|
||||
case LLAgent::TELEPORT_ARRIVING:
|
||||
|
|
|
|||
|
|
@ -46,4 +46,7 @@ extern BOOL gWindowResized;
|
|||
extern F32 gSavedDrawDistance;
|
||||
extern F32 gLastDrawDistanceStep;
|
||||
|
||||
// <FS:Ansariel> FIRE-12004: Attachments getting lost on TP
|
||||
extern LLFrameTimer gPostTeleportFinishKillObjectDelayTimer;
|
||||
|
||||
#endif // LL_LLVIEWERDISPLAY_H
|
||||
|
|
|
|||
|
|
@ -4489,16 +4489,31 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
|
|||
{
|
||||
// <FS:Ansariel> FIRE-12004: Attachments getting lost on TP
|
||||
static LLCachedControl<bool> fsExperimentalLostAttachmentsFix(gSavedSettings, "FSExperimentalLostAttachmentsFix");
|
||||
static LLCachedControl<F32> fsExperimentalLostAttachmentsFixKillDelay(gSavedSettings, "FSExperimentalLostAttachmentsFixKillDelay");
|
||||
if (fsExperimentalLostAttachmentsFix &&
|
||||
isAgentAvatarValid() &&
|
||||
(gAgent.getTeleportState() != LLAgent::TELEPORT_NONE || gAgentAvatarp->isCrossingRegion()) &&
|
||||
(gAgent.getTeleportState() != LLAgent::TELEPORT_NONE || gPostTeleportFinishKillObjectDelayTimer.getElapsedTimeF32() <= fsExperimentalLostAttachmentsFixKillDelay || gAgentAvatarp->isCrossingRegion()) &&
|
||||
(objectp->isAttachment() || objectp->isTempAttachment()) &&
|
||||
objectp->permYouOwner())
|
||||
{
|
||||
// Simply ignore the request and don't kill the object - this should work...
|
||||
if (gSavedSettings.getBOOL("FSExperimentalLostAttachmentsFixReport"))
|
||||
{
|
||||
report_to_nearby_chat("Sim tried to kill attachment: " + objectp->getAttachmentItemName() + " (" + (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE ? "tp" : "crossing") + ")");
|
||||
std::string reason;
|
||||
if (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE)
|
||||
{
|
||||
reason = "tp";
|
||||
}
|
||||
else if (gAgentAvatarp->isCrossingRegion())
|
||||
{
|
||||
reason = "crossing";
|
||||
}
|
||||
else
|
||||
{
|
||||
reason = "timer";
|
||||
}
|
||||
|
||||
report_to_nearby_chat("Sim tried to kill attachment: " + objectp->getAttachmentItemName() + " (" + reason + ")");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue