summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-10-29 15:43:21 -0700
committerBrad Linden <brad@lindenlab.com>2024-10-29 15:43:21 -0700
commit74b0c86e48387e2154cb2acf03f626ca11229bce (patch)
tree0c74138a6d0c60eb5dffcc745464b58a6b315036 /indra/newview/llappviewer.cpp
parent9598e2f4cedd3dc36d447086273e0ed97967bbf9 (diff)
parent1a7909517368206d54407e54b9332aed1e4c9863 (diff)
Merge brad/2549-downrez-controls into release/2024.09-ExtraFPS (#2864)
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp42
1 files changed, 9 insertions, 33 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 4eb4f5ae20..093314a9f1 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -642,8 +642,6 @@ LLAppViewer::LLAppViewer()
mQuitRequested(false),
mClosingFloaters(false),
mLogoutRequestSent(false),
- mLastAgentControlFlags(0),
- mLastAgentForceUpdate(0),
mMainloopTimeout(NULL),
mAgentRegionLastAlive(false),
mRandomizeFramerate(LLCachedControl<bool>(gSavedSettings,"Randomize Framerate", false)),
@@ -3287,10 +3285,10 @@ LLSD LLAppViewer::getViewerInfo() const
LLVector3d pos = gAgent.getPositionGlobal();
info["POSITION"] = ll_sd_from_vector3d(pos);
info["POSITION_LOCAL"] = ll_sd_from_vector3(gAgent.getPosAgentFromGlobal(pos));
- info["REGION"] = gAgent.getRegion()->getName();
+ info["REGION"] = region->getName();
boost::regex regex("\\.(secondlife|lindenlab)\\..*");
- info["HOSTNAME"] = boost::regex_replace(gAgent.getRegion()->getSimHostName(), regex, "");
+ info["HOSTNAME"] = boost::regex_replace(region->getSimHostName(), regex, "");
info["SERVER_VERSION"] = gLastVersionChannel;
LLSLURL slurl;
LLAgentUI::buildSLURL(slurl);
@@ -4711,30 +4709,13 @@ void LLAppViewer::idle()
gAgent.autoPilot(&yaw);
}
- static LLFrameTimer agent_update_timer;
-
- // When appropriate, update agent location to the simulator.
- F32 agent_update_time = agent_update_timer.getElapsedTimeF32();
- F32 agent_force_update_time = mLastAgentForceUpdate + agent_update_time;
- bool timed_out = agent_update_time > (1.0f / (F32)AGENT_UPDATES_PER_SECOND);
- bool force_send =
- // if there is something to send
- (gAgent.controlFlagsDirty() && timed_out)
- // if something changed
- || (mLastAgentControlFlags != gAgent.getControlFlags())
- // keep alive
- || (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND));
- // timing out doesn't warranty that an update will be sent,
- // just that it will be checked.
- if (force_send || timed_out)
- {
- LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
- // Send avatar and camera info
- mLastAgentControlFlags = gAgent.getControlFlags();
- mLastAgentForceUpdate = force_send ? 0 : agent_force_update_time;
- send_agent_update(force_send);
- agent_update_timer.reset();
- }
+ send_agent_update(false);
+
+ // After calling send_agent_update() in the mainloop we always clear
+ // the agent's ephemeral ControlFlags (whether an AgentUpdate was
+ // actually sent or not) because these will be recomputed based on
+ // real-time key/controller input and resubmitted next frame.
+ gAgent.resetControlFlags();
}
//////////////////////////////////////
@@ -5346,11 +5327,6 @@ void LLAppViewer::idleNetwork()
}
#endif
-
-
- // we want to clear the control after sending out all necessary agent updates
- gAgent.resetControlFlags();
-
// Decode enqueued messages...
S32 remaining_possible_decodes = MESSAGE_MAX_PER_FRAME - total_decoded;