summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2008-03-14 19:27:38 +0000
committerJosh Bell <josh@lindenlab.com>2008-03-14 19:27:38 +0000
commit133a7b5fe2bcaaec8389b209cb5bd774ebc2ab63 (patch)
treed7a8f7846af7dc948d9e11c5a75dd830fb12465c /indra/newview/llviewermenu.cpp
parenta1cde743e755d826c86aeb006d2027ad2e5c8ce3 (diff)
svn merge -r 82272:82277 svn+ssh://svn.lindenlab.com/svn/linden/branches/maint-ui-9-merge-2 --> release
QAR-364 - merge of maint-ui-9
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 8ef9d9c913..a384d24947 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -4881,23 +4881,22 @@ class LLWorldAlwaysRun : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
+ // as well as altering the default walk-vs-run state,
+ // we also change the *current* walk-vs-run state.
if (gAgent.getAlwaysRun())
{
gAgent.clearAlwaysRun();
+ gAgent.clearRunning();
}
else
{
gAgent.setAlwaysRun();
+ gAgent.setRunning();
}
- LLMessageSystem *msg = gMessageSystem;
+ // tell the simulator.
+ gAgent.sendWalkRun(gAgent.getAlwaysRun());
- msg->newMessageFast(_PREHASH_SetAlwaysRun);
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->addBOOLFast(_PREHASH_AlwaysRun, gAgent.getAlwaysRun() );
- gAgent.sendReliableMessage();
return true;
}
};