diff options
| author | leviathan <leviathan@lindenlab.com> | 2026-10-08 13:39:49 -0700 |
|---|---|---|
| committer | leviathan <leviathan@lindenlab.com> | 2026-10-16 13:38:07 -0700 |
| commit | d4270de9eac1f79f267c2fae75c57c2464dc6bbd (patch) | |
| tree | 0f1b8a6434c6ea5fb2c80b52f4afa695b4383d93 /indra | |
| parent | 4a53b100a0dd83e08bfb988ddd138ecf48fa7073 (diff) | |
put GameControlData message behind feature flag
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llappviewer.cpp | 12 | ||||
| -rw-r--r-- | indra/newview/llviewerregion.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llviewerregion.h | 3 |
3 files changed, 20 insertions, 2 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f269138e9b..62315ac561 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5456,10 +5456,18 @@ void LLAppViewer::idle() else { // Recompute canonical controller state (also populates the internal - // state consumed below) and send it to the server when it changed. + // state consumed below) and send it to the server when it changed, + // but only if the agent's region advertises support for it (the + // "GameControlEnabled" simulator feature). While unsupported the + // resend deadline is left untouched, so the first frame after the + // feature appears sends immediately. if (LLGameControl::computeFinalStateAndCheckForChanges()) { - sendGameControlData(); + LLViewerRegion* regionp = gAgent.getRegion(); + if (regionp && regionp->gameControlEnabled()) + { + sendGameControlData(); + } } // Drive the local avatar from the controller. In Avatar/Captive diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 83452e2f12..bdd110c97b 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -3772,6 +3772,13 @@ bool LLViewerRegion::groupChatPostLinksEnabled() const return ( mSimulatorFeatures.has("GroupChatPostLinksEnabled") && mSimulatorFeatures["GroupChatPostLinksEnabled"].asBoolean()); } + +bool LLViewerRegion::gameControlEnabled() const +{ + return ( mSimulatorFeatures.has("GameControlEnabled") && + mSimulatorFeatures["GameControlEnabled"].asBoolean()); +} + /* Static Functions */ void log_capabilities(const CapabilityMap &capmap) diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index d5bd6479eb..caaebd37c3 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -353,6 +353,9 @@ public: bool groupChatPostLinksEnabled() const; + // does the simulator accept GameControlData messages? + bool gameControlEnabled() const; + typedef enum { CACHE_MISS_TYPE_TOTAL = 0, // total cache miss - object not in cache |
