diff options
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llviewercontrol.cpp | 14 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 11 |
3 files changed, 36 insertions, 0 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4e2f836606..2a08f62bb4 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -23,6 +23,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>AgentPause</key> + <map> + <key>Comment</key> + <string>Ask the simulator to stop updating the agent while enabled</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>AlertedUnsupportedHardware</key> <map> <key>Comment</key> diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 2c1707e49f..be832ebe32 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -470,6 +470,19 @@ bool handleVelocityInterpolate(const LLSD& newvalue) return true; } +bool toggle_agent_pause(const LLSD& newvalue) +{ + if ( newvalue.asBoolean() ) + { + send_agent_pause(); + } + else + { + send_agent_resume(); + } + return true; +} + //////////////////////////////////////////////////////////////////////////// void settings_setup_listeners() @@ -601,6 +614,7 @@ void settings_setup_listeners() gSavedSettings.getControl("VelocityInterpolate")->getSignal()->connect(boost::bind(&handleVelocityInterpolate, _2)); gSavedSettings.getControl("QAMode")->getSignal()->connect(boost::bind(&show_debug_menus)); gSavedSettings.getControl("UseDebugMenus")->getSignal()->connect(boost::bind(&show_debug_menus)); + gSavedSettings.getControl("AgentPause")->getSignal()->connect(boost::bind(&toggle_agent_pause, _2)); } #if TEST_CACHED_CONTROL diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 352ec79385..ef9e22d908 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2138,6 +2138,17 @@ layout="topleft" name="Network" tear_off="true"> + <menu_item_check + label="Pause Agent" + layout="topleft" + name="AgentPause"> + <menu_item_check.on_check + function="CheckControl" + parameter="AgentPause" /> + <menu_item_check.on_click + function="ToggleControl" + parameter="AgentPause" /> + </menu_item_check> <menu_item_call label="Enable Message Log" layout="topleft" |