aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--linden/indra/newview/CMakeLists.txt3
-rw-r--r--linden/indra/newview/app_settings/settings.xml85
-rw-r--r--linden/indra/newview/floaterao.cpp1358
-rw-r--r--linden/indra/newview/floaterao.h127
-rw-r--r--linden/indra/newview/llagent.cpp4
-rw-r--r--linden/indra/newview/llviewermenu.cpp12
-rw-r--r--linden/indra/newview/llvoavatar.cpp28
-rw-r--r--linden/indra/newview/skins/default/xui/de/floater_ao.xml95
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_ao.xml231
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml5
10 files changed, 1947 insertions, 1 deletions
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt
index 514811d..b339947 100644
--- a/linden/indra/newview/CMakeLists.txt
+++ b/linden/indra/newview/CMakeLists.txt
@@ -66,6 +66,7 @@ include_directories(
66 66
67set(viewer_SOURCE_FILES 67set(viewer_SOURCE_FILES
68 emeraldboobutils.cpp 68 emeraldboobutils.cpp
69 floaterao.cpp
69 floaterlogin.cpp 70 floaterlogin.cpp
70 hippoGridManager.cpp 71 hippoGridManager.cpp
71 hippoLimits.cpp 72 hippoLimits.cpp
@@ -488,6 +489,7 @@ set(viewer_HEADER_FILES
488 CMakeLists.txt 489 CMakeLists.txt
489 ViewerInstall.cmake 490 ViewerInstall.cmake
490 emeraldboobutils.h 491 emeraldboobutils.h
492 floaterao.h
491 floaterlogin.h 493 floaterlogin.h
492 hippoGridManager.h 494 hippoGridManager.h
493 hippoLimits.h 495 hippoLimits.h
@@ -1082,6 +1084,7 @@ set(viewer_XUI_FILES
1082 skins/default/xui/en-us/floater_active_speakers.xml 1084 skins/default/xui/en-us/floater_active_speakers.xml
1083 skins/default/xui/en-us/floater_animation_list.xml 1085 skins/default/xui/en-us/floater_animation_list.xml
1084 skins/default/xui/en-us/floater_animation_preview.xml 1086 skins/default/xui/en-us/floater_animation_preview.xml
1087 skins/default/xui/en-us/floater_ao.xml
1085 skins/default/xui/en-us/floater_asset_browser.xml 1088 skins/default/xui/en-us/floater_asset_browser.xml
1086 skins/default/xui/en-us/floater_auction.xml 1089 skins/default/xui/en-us/floater_auction.xml
1087 skins/default/xui/en-us/floater_audio_volume.xml 1090 skins/default/xui/en-us/floater_audio_volume.xml
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 3026cc7..3cb13bb 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -2,6 +2,91 @@
2<llsd> 2<llsd>
3<map> 3<map>
4 4
5 <!-- Begin: AO-->
6
7 <key>AOEnabled</key>
8 <map>
9 <key>Comment</key>
10 <string>Turn on Animation Overrider</string>
11 <key>Persist</key>
12 <integer>1</integer>
13 <key>Type</key>
14 <string>Boolean</string>
15 <key>Value</key>
16 <integer>0</integer>
17 </map>
18 <key>AOAdvanced</key>
19 <map>
20 <key>Comment</key>
21 <string>Advanced options</string>
22 <key>Persist</key>
23 <integer>0</integer>
24 <key>Type</key>
25 <string>Boolean</string>
26 <key>Value</key>
27 <integer>0</integer>
28 </map>
29 <key>AOSitsEnabled</key>
30 <map>
31 <key>Comment</key>
32 <string>Overrides sit animations.</string>
33 <key>Persist</key>
34 <integer>1</integer>
35 <key>Type</key>
36 <string>Boolean</string>
37 <key>Value</key>
38 <integer>1</integer>
39 </map>
40 <key>AONoStandsInMouselook</key>
41 <map>
42 <key>Comment</key>
43 <string>Disables stand anims during mouselook</string>
44 <key>Persist</key>
45 <integer>1</integer>
46 <key>Type</key>
47 <string>Boolean</string>
48 <key>Value</key>
49 <integer>1</integer>
50 </map>
51 <key>AOStandInterval</key>
52 <map>
53 <key>Comment</key>
54 <string>AO stand time in seconds</string>
55 <key>Persist</key>
56 <integer>1</integer>
57 <key>Type</key>
58 <string>F32</string>
59 <key>Value</key>
60 <real>20</real>
61 </map>
62 <key>AOStandRandomize</key>
63 <map>
64 <key>Comment</key>
65 <string>Randomize stand anims</string>
66 <key>Persist</key>
67 <integer>1</integer>
68 <key>Type</key>
69 <string>Boolean</string>
70 <key>Value</key>
71 <integer>0</integer>
72 </map>
73 <key>AORect</key>
74 <map>
75 <key>Comment</key>
76 <string>Rectangle for AO window</string>
77 <key>Persist</key>
78 <integer>1</integer>
79 <key>Type</key>
80 <string>Rect</string>
81 <key>Value</key>
82 <array>
83 <integer>0</integer>
84 <integer>100</integer>
85 <integer>100</integer>
86 <integer>100</integer>
87 </array>
88 </map>
89
5<!-- Begin: Client Name Tag --> 90<!-- Begin: Client Name Tag -->
6 91
7 <key>ShowClientNameTag</key> 92 <key>ShowClientNameTag</key>
diff --git a/linden/indra/newview/floaterao.cpp b/linden/indra/newview/floaterao.cpp
new file mode 100644
index 0000000..e3083d3
--- /dev/null
+++ b/linden/indra/newview/floaterao.cpp
@@ -0,0 +1,1358 @@
1/**
2 * @file llfloaterao.cpp
3 * @brief clientside animation overrider
4 * by Skills Hak
5 */
6
7#include "llviewerprecompiledheaders.h"
8
9#include "floaterao.h"
10
11#include "llagent.h"
12#include "llvoavatar.h"
13#include "llanimationstates.h"
14#include "lluictrlfactory.h"
15#include "llinventoryview.h"
16#include "llstartup.h"
17#include "llpreviewnotecard.h"
18#include "llviewertexteditor.h"
19#include "llcheckboxctrl.h"
20#include "llcombobox.h"
21#include "llspinctrl.h"
22// Uncomment and use instead if we ever add the chatbar as a command line - MC
23//#include "chatbar_as_cmdline.h"
24#include "llfloaterchat.h"
25
26#include "llinventory.h"
27#include "llinventoryview.h"
28#include "roles_constants.h"
29#include "llviewerregion.h"
30
31#include "llpanelinventory.h"
32#include "llinventorybridge.h"
33
34#include "llboost.h"
35#include <boost/regex.hpp>
36
37// Uncomment and use instead if we ever add the chatbar as a command line - MC
38//void cmdline_printchat(std::string message);
39void cmdline_printchat(std::string message)
40{
41 LLChat chat;
42 chat.mText = message;
43 chat.mSourceType = CHAT_SOURCE_SYSTEM;
44 LLFloaterChat::addChat(chat, FALSE, FALSE);
45}
46
47
48// -------------------------------------------------------
49
50AOStandTimer* mAOStandTimer;
51
52AOStandTimer::AOStandTimer() : LLEventTimer( gSavedSettings.getF32("AOStandInterval") )
53{
54 AOStandTimer::tick();
55}
56AOStandTimer::~AOStandTimer()
57{
58// llinfos << "dead" << llendl;
59}
60void AOStandTimer::reset()
61{
62 mPeriod = gSavedSettings.getF32("AOStandInterval");
63 mEventTimer.reset();
64// llinfos << "reset" << llendl;
65}
66BOOL AOStandTimer::tick()
67{
68 LLFloaterAO::stand_iterator++;
69// llinfos << "tick" << llendl;
70 LLFloaterAO::ChangeStand();
71 return FALSE;
72// return LLFloaterAO::ChangeStand(); //timer is always active now ..
73}
74
75// -------------------------------------------------------
76
77AOInvTimer::AOInvTimer() : LLEventTimer( (F32)1.0 )
78{
79}
80AOInvTimer::~AOInvTimer()
81{
82}
83BOOL AOInvTimer::tick()
84{
85 if (!(gSavedSettings.getBOOL("AOEnabled"))) return TRUE;
86 if(LLStartUp::getStartupState() >= STATE_INVENTORY_SEND)
87 {
88 if(gInventory.isEverythingFetched())
89 {
90// cmdline_printchat("Inventory fetched, loading AO.");
91 LLFloaterAO::init();
92 return TRUE;
93 }
94 }
95 return FALSE;
96}
97// NC DROP -------------------------------------------------------
98
99class AONoteCardDropTarget : public LLView
100{
101public:
102 AONoteCardDropTarget(const std::string& name, const LLRect& rect, void (*callback)(LLViewerInventoryItem*));
103 ~AONoteCardDropTarget();
104
105 void doDrop(EDragAndDropType cargo_type, void* cargo_data);
106
107 //
108 // LLView functionality
109 virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
110 EDragAndDropType cargo_type,
111 void* cargo_data,
112 EAcceptance* accept,
113 std::string& tooltip_msg);
114protected:
115 void (*mDownCallback)(LLViewerInventoryItem*);
116};
117
118
119AONoteCardDropTarget::AONoteCardDropTarget(const std::string& name, const LLRect& rect,
120 void (*callback)(LLViewerInventoryItem*)) :
121 LLView(name, rect, NOT_MOUSE_OPAQUE, FOLLOWS_ALL),
122 mDownCallback(callback)
123{
124}
125
126AONoteCardDropTarget::~AONoteCardDropTarget()
127{
128}
129
130void AONoteCardDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data)
131{
132// llinfos << "AONoteCardDropTarget::doDrop()" << llendl;
133}
134
135BOOL AONoteCardDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
136 EDragAndDropType cargo_type,
137 void* cargo_data,
138 EAcceptance* accept,
139 std::string& tooltip_msg)
140{
141 BOOL handled = FALSE;
142 if(getParent())
143 {
144 handled = TRUE;
145 LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data;
146 if(gInventory.getItem(inv_item->getUUID()))
147 {
148 *accept = ACCEPT_YES_COPY_SINGLE;
149 if(drop)
150 {
151 mDownCallback(inv_item);
152 }
153 }
154 else
155 {
156 *accept = ACCEPT_NO;
157 }
158 }
159 return handled;
160}
161
162AONoteCardDropTarget * LLFloaterAO::mAOItemDropTarget;
163
164
165// STUFF -------------------------------------------------------
166
167int LLFloaterAO::mAnimationState = 0;
168int LLFloaterAO::stand_iterator = 0;
169
170LLUUID LLFloaterAO::invfolderid = LLUUID::null;
171LLUUID LLFloaterAO::mCurrentStandId = LLUUID::null;
172
173LLComboBox* mcomboBox_stands;
174LLComboBox* mcomboBox_walks;
175LLComboBox* mcomboBox_runs;
176LLComboBox* mcomboBox_jumps;
177LLComboBox* mcomboBox_sits;
178LLComboBox* mcomboBox_gsits;
179LLComboBox* mcomboBox_crouchs;
180LLComboBox* mcomboBox_cwalks;
181LLComboBox* mcomboBox_falls;
182LLComboBox* mcomboBox_hovers;
183LLComboBox* mcomboBox_flys;
184LLComboBox* mcomboBox_flyslows;
185LLComboBox* mcomboBox_flyups;
186LLComboBox* mcomboBox_flydowns;
187LLComboBox* mcomboBox_lands;
188LLComboBox* mcomboBox_standups;
189LLComboBox* mcomboBox_prejumps;
190
191struct struct_overrides
192{
193 LLUUID orig_id;
194 LLUUID ao_id;
195 int state;
196};
197std::vector<struct_overrides> mAOOverrides;
198
199struct struct_stands
200{
201 LLUUID ao_id;
202 std::string anim_name;
203};
204std::vector<struct_stands> mAOStands;
205
206struct struct_tokens
207{
208 std::string token;
209 int state;
210};
211std::vector<struct_tokens> mAOTokens;
212
213LLFloaterAO* LLFloaterAO::sInstance = NULL;
214
215LLFloaterAO::LLFloaterAO()
216:LLFloater(std::string("floater_ao"))
217{
218// init();
219 llassert_always(sInstance == NULL);
220 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_ao.xml");
221 sInstance = this;
222}
223
224LLFloaterAO::~LLFloaterAO()
225{
226 sInstance=NULL;
227 mcomboBox_stands = 0;
228 mcomboBox_walks = 0;
229 mcomboBox_runs = 0;
230 mcomboBox_jumps = 0;
231 mcomboBox_sits = 0;
232 mcomboBox_gsits = 0;
233 mcomboBox_crouchs = 0;
234 mcomboBox_cwalks = 0;
235 mcomboBox_falls = 0;
236 mcomboBox_hovers = 0;
237 mcomboBox_flys = 0;
238 mcomboBox_flyslows = 0;
239 mcomboBox_flyups = 0;
240 mcomboBox_flydowns = 0;
241 mcomboBox_lands = 0;
242 mcomboBox_standups = 0;
243 mcomboBox_prejumps = 0;
244 delete mAOItemDropTarget;
245 mAOItemDropTarget = NULL;
246// llinfos << "floater destroyed" << llendl;
247}
248
249void LLFloaterAO::show(void*)
250{
251 if (!sInstance)
252 sInstance = new LLFloaterAO();
253 updateLayout(sInstance);
254 init();
255
256 sInstance->open();
257}
258
259BOOL LLFloaterAO::postBuild()
260{
261 LLView *target_view = getChild<LLView>("ao_notecard");
262 if(target_view)
263 {
264 if (mAOItemDropTarget)
265 {
266 delete mAOItemDropTarget;
267 }
268 mAOItemDropTarget = new AONoteCardDropTarget("drop target", target_view->getRect(), AOItemDrop);//, mAvatarID);
269 addChild(mAOItemDropTarget);
270 }
271 if(LLStartUp::getStartupState() == STATE_STARTED)
272 {
273 LLUUID itemidimport = (LLUUID)gSavedPerAccountSettings.getString("AOConfigNotecardID");
274 LLViewerInventoryItem* itemimport = gInventory.getItem(itemidimport);
275 if(itemimport)
276 {
277 childSetValue("ao_nc_text","Currently set to: "+itemimport->getName());
278 }
279 else if(itemidimport.isNull())
280 {
281 childSetValue("ao_nc_text","Currently not set");
282 }
283 else
284 {
285 childSetValue("ao_nc_text","Currently set to a item not on this account");
286 }
287 }
288 else
289 {
290 childSetValue("ao_nc_text","Not logged in");
291 }
292 childSetAction("more_btn", onClickMore, this);
293 childSetAction("less_btn", onClickLess, this);
294
295 childSetAction("reloadcard",onClickReloadCard,this);
296 childSetAction("opencard",onClickOpenCard,this);
297 childSetAction("prevstand",onClickPrevStand,this);
298 childSetAction("nextstand",onClickNextStand,this);
299 childSetCommitCallback("AOEnabled",onClickToggleAO);
300 childSetCommitCallback("AOSitsEnabled",onClickToggleSits);
301 childSetCommitCallback("standtime",onSpinnerCommit);
302 mcomboBox_stands = getChild<LLComboBox>("stands");
303 mcomboBox_walks = getChild<LLComboBox>("walks");
304 mcomboBox_runs = getChild<LLComboBox>("runs");
305 mcomboBox_jumps = getChild<LLComboBox>("jumps");
306 mcomboBox_sits = getChild<LLComboBox>("sits");
307 mcomboBox_gsits = getChild<LLComboBox>("gsits");
308 mcomboBox_crouchs = getChild<LLComboBox>("crouchs");
309 mcomboBox_cwalks = getChild<LLComboBox>("cwalks");
310 mcomboBox_falls = getChild<LLComboBox>("falls");
311 mcomboBox_hovers = getChild<LLComboBox>("hovers");
312 mcomboBox_flys = getChild<LLComboBox>("flys");
313 mcomboBox_flyslows = getChild<LLComboBox>("flyslows");
314 mcomboBox_flyups = getChild<LLComboBox>("flyups");
315 mcomboBox_flydowns = getChild<LLComboBox>("flydowns");
316 mcomboBox_lands = getChild<LLComboBox>("lands");
317 mcomboBox_standups = getChild<LLComboBox>("standups");
318 mcomboBox_prejumps = getChild<LLComboBox>("prejumps");
319 getChild<LLComboBox>("stands")->setCommitCallback(onComboBoxCommit);
320 getChild<LLComboBox>("walks")->setCommitCallback(onComboBoxCommit);
321 getChild<LLComboBox>("runs")->setCommitCallback(onComboBoxCommit);
322 getChild<LLComboBox>("jumps")->setCommitCallback(onComboBoxCommit);
323 getChild<LLComboBox>("sits")->setCommitCallback(onComboBoxCommit);
324 getChild<LLComboBox>("gsits")->setCommitCallback(onComboBoxCommit);
325 getChild<LLComboBox>("crouchs")->setCommitCallback(onComboBoxCommit);
326 getChild<LLComboBox>("cwalks")->setCommitCallback(onComboBoxCommit);
327 getChild<LLComboBox>("falls")->setCommitCallback(onComboBoxCommit);
328 getChild<LLComboBox>("hovers")->setCommitCallback(onComboBoxCommit);
329 getChild<LLComboBox>("flys")->setCommitCallback(onComboBoxCommit);
330 getChild<LLComboBox>("flyslows")->setCommitCallback(onComboBoxCommit);
331 getChild<LLComboBox>("flyups")->setCommitCallback(onComboBoxCommit);
332 getChild<LLComboBox>("flydowns")->setCommitCallback(onComboBoxCommit);
333 getChild<LLComboBox>("lands")->setCommitCallback(onComboBoxCommit);
334 getChild<LLComboBox>("standups")->setCommitCallback(onComboBoxCommit);
335 getChild<LLComboBox>("prejumps")->setCommitCallback(onComboBoxCommit);
336
337 return TRUE;
338}
339
340void LLFloaterAO::onSpinnerCommit(LLUICtrl* ctrl, void* userdata)
341{
342 LLSpinCtrl* spin = (LLSpinCtrl*) ctrl;
343 if(spin)
344 {
345 if (spin->getName() == "standtime")
346 {
347 if (mAOStandTimer) mAOStandTimer->reset();
348 }
349 }
350}
351
352void LLFloaterAO::onComboBoxCommit(LLUICtrl* ctrl, void* userdata)
353{
354 LLComboBox* box = (LLComboBox*)ctrl;
355 if(box)
356 {
357 if (box->getName() == "stands")
358 {
359 stand_iterator = box->getCurrentIndex();
360 cmdline_printchat(llformat("Changing stand to %s.",mAOStands[stand_iterator].anim_name.c_str()));
361 ChangeStand();
362 }
363 else
364 {
365 int state = STATE_AGENT_IDLE;
366 std::string stranim = box->getValue().asString();
367// llinfos << "state " << (gAgent.getAvatarObject()->mIsSitting) << " - " << getAnimationState() << llendl;
368 if (box->getName() == "walks")
369 {
370 gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_WALK), ANIM_REQUEST_STOP);
371 gSavedPerAccountSettings.setString("AODefaultWalk",stranim);
372 state = STATE_AGENT_WALK;
373 }
374 else if (box->getName() == "runs")
375 {
376 gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_RUN), ANIM_REQUEST_STOP);
377 gSavedPerAccountSettings.setString("AODefaultRun",stranim);
378 state = STATE_AGENT_RUN;
379 }
380 else if (box->getName() == "jumps")
381 {
382 gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_JUMP), ANIM_REQUEST_STOP);
383 gSavedPerAccountSettings.setString("AODefaultJump",stranim);
384 state = STATE_AGENT_JUMP;
385 }
386 else if (box->getName() == "sits")
387 {
388 if (gAgent.getAvatarObject() && (gSavedSettings.getBOOL("AOEnabled")) && (gSavedSettings.getBOOL("AOSitsEnabled")))
389 {
390 if ((gAgent.getAvatarObject()->mIsSitting) && (getAnimationState() == STATE_AGENT_SIT))
391 {
392// llinfos << "sitting " << GetAnimID(ANIM_AGENT_SIT) << " " << getAssetIDByName(stranim) << llendl;
393 gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_SIT), ANIM_REQUEST_STOP);
394 gAgent.sendAnimationRequest(getAssetIDByName(stranim), ANIM_REQUEST_START);
395 }
396 }
397 gSavedPerAccountSettings.setString("AODefaultSit",stranim);
398 state = STATE_AGENT_SIT;
399 }
400 else if (box->getName() == "gsits")
401 {
402// llinfos << "gsitting " << GetAnimID(ANIM_AGENT_SIT_GROUND) << " " << getAssetIDByName(stranim) << llendl;
403 if (gAgent.getAvatarObject())
404 {
405 if ((gAgent.getAvatarObject()->mIsSitting) && (getAnimationState() == STATE_AGENT_GROUNDSIT))
406 {
407// llinfos << "gsitting " << GetAnimID(ANIM_AGENT_SIT_GROUND) << " " << getAssetIDByName(stranim) << llendl;
408 gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_SIT_GROUND), ANIM_REQUEST_STOP);
409 gAgent.sendAnimationRequest(getAssetIDByName(stranim), ANIM_REQUEST_START);
410 }
411 }
412 gSavedPerAccountSettings.setString("AODefaultGroundSit",stranim);
413 state = STATE_AGENT_GROUNDSIT;
414 }
415 else if (box->getName() == "crouchs")
416 {
417 gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_CROUCH), ANIM_REQUEST_STOP);
418 gSavedPerAccountSettings.setString("AODefaultCrouch",stranim);
419 state = STATE_AGENT_CROUCH;
420 }
421 else if (box->getName() == "cwalks")
422 {
423 gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_CROUCHWALK), ANIM_REQUEST_STOP);
424 gSavedPerAccountSettings.setString("AODefaultCrouchWalk",stranim);
425 state = STATE_AGENT_CROUCHWALK;
426 }
427 else if (box->getName() == "falls")
428 {
429 gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_FALLDOWN), ANIM_REQUEST_STOP);
430 gSavedPerAccountSettings.setString("AODefaultFall",stranim);
431 state = STATE_AGENT_FALLDOWN;
432 }
433 else if (box->getName() == "hovers")
434 {
435 gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_HOVER), ANIM_REQUEST_STOP);
436 gSavedPerAccountSettings.setString("AODefaultHover",stranim);
437 state = STATE_AGENT_HOVER;
438 }
439 else if (box->getName() == "flys")
440 {
441 gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_FLY), ANIM_REQUEST_STOP);
442 gSavedPerAccountSettings.setString("AODefaultFly",stranim);
443 state = STATE_AGENT_FLY;
444 }
445 else if (box->getName() == "flyslows")
446 {
447 gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_FLYSLOW), ANIM_REQUEST_STOP);
448 gSavedPerAccountSettings.setString("AODefaultFlySlow",stranim);
449 state = STATE_AGENT_FLYSLOW;
450 }
451 else if (box->getName() == "flyups")
452 {
453 gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_HOVER_UP), ANIM_REQUEST_STOP);
454 gSavedPerAccountSettings.setString("AODefaultFlyUp",stranim);
455 state = STATE_AGENT_HOVER_UP;
456 }
457 else if (box->getName() == "flydowns")
458 {
459 gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_HOVER_DOWN), ANIM_REQUEST_STOP);
460 gSavedPerAccountSettings.setString("AODefaultFlyDown",stranim);
461 state = STATE_AGENT_HOVER_DOWN;
462 }
463 else if (box->getName() == "lands")
464 {
465 gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_LAND), ANIM_REQUEST_STOP);
466 gSavedPerAccountSettings.setString("AODefaultLand",stranim);
467 state = STATE_AGENT_LAND;
468 }
469 else if (box->getName() == "standups")
470 {
471 gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_STAND), ANIM_REQUEST_STOP);
472 gSavedPerAccountSettings.setString("AODefaultStandUp",stranim);
473 state = STATE_AGENT_STAND;
474 }
475 else if (box->getName() == "prejumps")
476 {
477 gAgent.sendAnimationRequest(GetAnimID(ANIM_AGENT_PRE_JUMP), ANIM_REQUEST_STOP);
478 gSavedPerAccountSettings.setString("AODefaultPreJump",stranim);
479 state = STATE_AGENT_PRE_JUMP;
480 }
481 for (std::vector<struct_overrides>::iterator iter = mAOOverrides.begin(); iter != mAOOverrides.end(); ++iter)
482 {
483 if (state == iter->state)
484 {
485 iter->ao_id = getAssetIDByName(stranim);
486 }
487 }
488 }
489 }
490}
491
492void LLFloaterAO::updateLayout(LLFloaterAO* floater)
493{
494 if (floater)
495 {
496 BOOL advanced = gSavedSettings.getBOOL( "AOAdvanced");
497 if (advanced)
498 {
499 floater->reshape(610,380); //view->getRect().getWidth(), view->getUIWinHeightLong());
500 }
501 else
502 {
503 floater->reshape(200,380); //view->getRect().getWidth(), view->getUIWinHeightShort());
504 }
505
506 floater->childSetVisible("more_btn", !advanced);
507 floater->childSetVisible("less_btn", advanced);
508
509 floater->childSetVisible("tabcontainer", advanced);
510 floater->childSetVisible("tabdefaultanims", advanced);
511
512 floater->childSetVisible("textdefaultwalk", advanced);
513 floater->childSetVisible("textdefaultrun", advanced);
514 floater->childSetVisible("textdefaultjump", advanced);
515 floater->childSetVisible("textdefaultsit", advanced);
516 floater->childSetVisible("textdefaultgsit", advanced);
517 floater->childSetVisible("textdefaultcrouch", advanced);
518 floater->childSetVisible("textdefaultcrouchwalk", advanced);
519 floater->childSetVisible("textdefaultfall", advanced);
520 floater->childSetVisible("textdefaulthover", advanced);
521 floater->childSetVisible("textdefaultfly", advanced);
522 floater->childSetVisible("textdefaultflyslow", advanced);
523 floater->childSetVisible("textdefaultflyup", advanced);
524 floater->childSetVisible("textdefaultflydown", advanced);
525 floater->childSetVisible("textdefaultland", advanced);
526 floater->childSetVisible("textdefaultstandup", advanced);
527 floater->childSetVisible("textdefaultprejump", advanced);
528
529
530 floater->childSetVisible("walks", advanced);
531 floater->childSetVisible("runs", advanced);
532 floater->childSetVisible("jumps", advanced);
533 floater->childSetVisible("sits", advanced);
534 floater->childSetVisible("gsits", advanced);
535 floater->childSetVisible("crouchs", advanced);
536 floater->childSetVisible("crouchwalks", advanced);
537 floater->childSetVisible("falls", advanced);
538 floater->childSetVisible("hovers", advanced);
539 floater->childSetVisible("flys", advanced);
540 floater->childSetVisible("flyslows", advanced);
541 floater->childSetVisible("flyups", advanced);
542 floater->childSetVisible("flydowns", advanced);
543 floater->childSetVisible("lands", advanced);
544 floater->childSetVisible("standups", advanced);
545 floater->childSetVisible("prejumps", advanced);
546 }
547}
548
549void LLFloaterAO::init()
550{
551 mAOStands.clear();
552 mAOTokens.clear();
553 mAOOverrides.clear();
554
555 struct_tokens tokenloader;
556 tokenloader.token =
557 tokenloader.token = "[ Sitting On Ground ]"; tokenloader.state = STATE_AGENT_GROUNDSIT; mAOTokens.push_back(tokenloader); // 0
558 tokenloader.token = "[ Sitting ]"; tokenloader.state = STATE_AGENT_SIT; mAOTokens.push_back(tokenloader); // 1
559 tokenloader.token = "[ Crouching ]"; tokenloader.state = STATE_AGENT_CROUCH; mAOTokens.push_back(tokenloader); // 3
560 tokenloader.token = "[ Crouch Walking ]"; tokenloader.state = STATE_AGENT_CROUCHWALK; mAOTokens.push_back(tokenloader); // 4
561 tokenloader.token = "[ Standing Up ]"; tokenloader.state = STATE_AGENT_STANDUP; mAOTokens.push_back(tokenloader); // 6
562 tokenloader.token = "[ Falling ]"; tokenloader.state = STATE_AGENT_FALLDOWN; mAOTokens.push_back(tokenloader); // 7
563 tokenloader.token = "[ Flying Down ]"; tokenloader.state = STATE_AGENT_HOVER_DOWN; mAOTokens.push_back(tokenloader); // 8
564 tokenloader.token = "[ Flying Up ]"; tokenloader.state = STATE_AGENT_HOVER_UP; mAOTokens.push_back(tokenloader); // 9
565 tokenloader.token = "[ Flying Slow ]"; tokenloader.state = STATE_AGENT_FLYSLOW; mAOTokens.push_back(tokenloader); // 10
566 tokenloader.token = "[ Flying ]"; tokenloader.state = STATE_AGENT_FLY; mAOTokens.push_back(tokenloader); // 11
567 tokenloader.token = "[ Hovering ]"; tokenloader.state = STATE_AGENT_HOVER; mAOTokens.push_back(tokenloader); // 12
568 tokenloader.token = "[ Jumping ]"; tokenloader.state = STATE_AGENT_JUMP; mAOTokens.push_back(tokenloader); // 13
569 tokenloader.token = "[ Pre Jumping ]"; tokenloader.state = STATE_AGENT_PRE_JUMP; mAOTokens.push_back(tokenloader); // 14
570 tokenloader.token = "[ Running ]"; tokenloader.state = STATE_AGENT_RUN; mAOTokens.push_back(tokenloader); // 15
571 tokenloader.token = "[ Turning Right ]"; tokenloader.state = STATE_AGENT_TURNRIGHT; mAOTokens.push_back(tokenloader); // 16
572 tokenloader.token = "[ Turning Left ]"; tokenloader.state = STATE_AGENT_TURNLEFT; mAOTokens.push_back(tokenloader); // 17
573 tokenloader.token = "[ Walking ]"; tokenloader.state = STATE_AGENT_WALK; mAOTokens.push_back(tokenloader); // 18
574 tokenloader.token = "[ Landing ]"; tokenloader.state = STATE_AGENT_LAND; mAOTokens.push_back(tokenloader); // 19
575 tokenloader.token = "[ Standing ]"; tokenloader.state = STATE_AGENT_STAND; mAOTokens.push_back(tokenloader); // 20
576 tokenloader.token = "[ Swimming Down ]"; tokenloader.state = 999; mAOTokens.push_back(tokenloader); // 21
577 tokenloader.token = "[ Swimming Up ]"; tokenloader.state = 999; mAOTokens.push_back(tokenloader); // 22
578 tokenloader.token = "[ Swimming Forward ]"; tokenloader.state = 999; mAOTokens.push_back(tokenloader); // 23
579 tokenloader.token = "[ Floating ]"; tokenloader.state = 999; mAOTokens.push_back(tokenloader); // 24
580
581 struct_overrides overrideloader;
582 overrideloader.orig_id = ANIM_AGENT_WALK; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_WALK; mAOOverrides.push_back(overrideloader);
583 overrideloader.orig_id = ANIM_AGENT_RUN; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_RUN; mAOOverrides.push_back(overrideloader);
584 overrideloader.orig_id = ANIM_AGENT_PRE_JUMP; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_PRE_JUMP; mAOOverrides.push_back(overrideloader);
585 overrideloader.orig_id = ANIM_AGENT_JUMP; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_JUMP; mAOOverrides.push_back(overrideloader);
586 overrideloader.orig_id = ANIM_AGENT_TURNLEFT; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_TURNLEFT; mAOOverrides.push_back(overrideloader);
587 overrideloader.orig_id = ANIM_AGENT_TURNRIGHT; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_TURNRIGHT; mAOOverrides.push_back(overrideloader);
588
589 overrideloader.orig_id = ANIM_AGENT_SIT; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_SIT; mAOOverrides.push_back(overrideloader);
590 overrideloader.orig_id = ANIM_AGENT_SIT_FEMALE; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_SIT; mAOOverrides.push_back(overrideloader);
591 overrideloader.orig_id = ANIM_AGENT_SIT_GENERIC; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_SIT; mAOOverrides.push_back(overrideloader);
592 overrideloader.orig_id = ANIM_AGENT_SIT_GROUND; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_GROUNDSIT; mAOOverrides.push_back(overrideloader);
593 overrideloader.orig_id = ANIM_AGENT_SIT_GROUND_CONSTRAINED; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_GROUNDSIT; mAOOverrides.push_back(overrideloader);
594
595 overrideloader.orig_id = ANIM_AGENT_HOVER; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_HOVER; mAOOverrides.push_back(overrideloader);
596 overrideloader.orig_id = ANIM_AGENT_HOVER_DOWN; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_HOVER_DOWN; mAOOverrides.push_back(overrideloader);
597 overrideloader.orig_id = ANIM_AGENT_HOVER_UP; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_HOVER_UP; mAOOverrides.push_back(overrideloader);
598
599 overrideloader.orig_id = ANIM_AGENT_CROUCH; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_CROUCH; mAOOverrides.push_back(overrideloader);
600 overrideloader.orig_id = ANIM_AGENT_CROUCHWALK; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_CROUCHWALK; mAOOverrides.push_back(overrideloader);
601
602 overrideloader.orig_id = ANIM_AGENT_FALLDOWN; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_FALLDOWN; mAOOverrides.push_back(overrideloader);
603 overrideloader.orig_id = ANIM_AGENT_STANDUP; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_STANDUP; mAOOverrides.push_back(overrideloader);
604 overrideloader.orig_id = ANIM_AGENT_LAND; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_LAND; mAOOverrides.push_back(overrideloader);
605
606 overrideloader.orig_id = ANIM_AGENT_FLY; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_FLY; mAOOverrides.push_back(overrideloader);
607 overrideloader.orig_id = ANIM_AGENT_FLYSLOW; overrideloader.ao_id = LLUUID::null; overrideloader.state = STATE_AGENT_FLYSLOW; mAOOverrides.push_back(overrideloader);
608
609 BOOL success = TRUE;
610
611 if(LLStartUp::getStartupState() >= STATE_INVENTORY_SEND)
612 {
613 if(gInventory.isEverythingFetched())
614 {
615 LLUUID configncitem = (LLUUID)gSavedPerAccountSettings.getString("AOConfigNotecardID");
616 if (configncitem.notNull())
617 {
618 success = FALSE;
619 const LLInventoryItem* item = gInventory.getItem(configncitem);
620 if(item)
621 {
622 if (gAgent.allowOperation(PERM_COPY, item->getPermissions(),GP_OBJECT_MANIPULATE) || gAgent.isGodlike())
623 {
624 if(!item->getAssetUUID().isNull())
625 {
626 LLUUID* new_uuid = new LLUUID(configncitem);
627 LLHost source_sim = LLHost::invalid;
628 invfolderid = item->getParentUUID();
629 gAssetStorage->getInvItemAsset(source_sim,
630 gAgent.getID(),
631 gAgent.getSessionID(),
632 item->getPermissions().getOwner(),
633 LLUUID::null,
634 item->getUUID(),
635 item->getAssetUUID(),
636 item->getType(),
637 &onNotecardLoadComplete,
638 (void*)new_uuid,
639 TRUE);
640 success = TRUE;
641 }
642 }
643 }
644 }
645 }
646 }
647
648 if (!success)
649 {
650 cmdline_printchat("Could not read the specified Config Notecard");
651 }
652
653// mAnimationState = 0;
654// mCurrentStandId = LLUUID::null;
655// setAnimationState(STATE_AGENT_IDLE);
656
657}
658
659void LLFloaterAO::onClickMore(void* data)
660{
661 gSavedSettings.setBOOL( "AOAdvanced", TRUE );
662 updateLayout(sInstance);
663}
664void LLFloaterAO::onClickLess(void* data)
665{
666 gSavedSettings.setBOOL( "AOAdvanced", FALSE );
667 updateLayout(sInstance);
668}
669
670void LLFloaterAO::onClickToggleAO(LLUICtrl *, void*)
671{
672 run();
673}
674
675void LLFloaterAO::onClickToggleSits(LLUICtrl *, void*)
676{
677 run();
678}
679
680
681void LLFloaterAO::run()
682{
683 setAnimationState(STATE_AGENT_IDLE); // reset state
684 int state = getAnimationState(); // check if sitting or hovering
685 if ((state == STATE_AGENT_IDLE) || (state == STATE_AGENT_STAND))
686 {
687 if (gSavedSettings.getBOOL("AOEnabled"))
688 {
689 if (mAOStandTimer)
690 {
691 mAOStandTimer->reset();
692 ChangeStand();
693 }
694 else
695 {
696 mAOStandTimer = new AOStandTimer();
697 }
698 }
699 else
700 {
701 stopMotion(getCurrentStandId(), FALSE, TRUE); //stop stand first then set state
702 setAnimationState(STATE_AGENT_IDLE);
703 }
704 }
705 else
706 {
707 if (state == STATE_AGENT_SIT) gAgent.sendAnimationRequest(GetAnimIDFromState(state), (gSavedSettings.getBOOL("AOEnabled") && gSavedSettings.getBOOL("AOSitsEnabled")) ? ANIM_REQUEST_START : ANIM_REQUEST_STOP);
708 else gAgent.sendAnimationRequest(GetAnimIDFromState(state), gSavedSettings.getBOOL("AOEnabled") ? ANIM_REQUEST_START : ANIM_REQUEST_STOP);
709 }
710}
711
712int LLFloaterAO::getAnimationState()
713{
714 if (gAgent.getAvatarObject())
715 {
716 if (gAgent.getAvatarObject()->mIsSitting) setAnimationState(STATE_AGENT_SIT);
717 else if (gAgent.getFlying()) setAnimationState(STATE_AGENT_HOVER);
718 }
719 return mAnimationState;
720}
721
722void LLFloaterAO::setAnimationState(const int state)
723{
724 mAnimationState = state;
725}
726
727LLUUID LLFloaterAO::getCurrentStandId()
728{
729 return mCurrentStandId;
730}
731
732void LLFloaterAO::setCurrentStandId(const LLUUID& id)
733{
734 mCurrentStandId = id;
735}
736
737void LLFloaterAO::AOItemDrop(LLViewerInventoryItem* item)
738{
739 gSavedPerAccountSettings.setString("AOConfigNotecardID", item->getUUID().asString());
740 sInstance->childSetValue("ao_nc_text","Currently set to: "+item->getName());
741}
742
743LLUUID LLFloaterAO::GetAnimID(const LLUUID& id)
744{
745 for (std::vector<struct_overrides>::iterator iter = mAOOverrides.begin(); iter != mAOOverrides.end(); ++iter)
746 {
747 if (iter->orig_id == id) return iter->ao_id;
748 }
749 return LLUUID::null;
750}
751
752int LLFloaterAO::GetStateFromAnimID(const LLUUID& id)
753{
754 for (std::vector<struct_overrides>::iterator iter = mAOOverrides.begin(); iter != mAOOverrides.end(); ++iter)
755 {
756 if (iter->orig_id == id) return iter->state;
757 }
758 return STATE_AGENT_IDLE;
759}
760
761LLUUID LLFloaterAO::GetAnimIDFromState(const int state)
762{
763 for (std::vector<struct_overrides>::iterator iter = mAOOverrides.begin(); iter != mAOOverrides.end(); ++iter)
764 {
765 if (iter->state == state) return iter->ao_id;
766 }
767 return LLUUID::null;
768}
769
770int LLFloaterAO::GetStateFromToken(std::string strtoken)
771{
772 for (std::vector<struct_tokens>::iterator iter = mAOTokens.begin(); iter != mAOTokens.end(); ++iter)
773 {
774 if (iter->token == strtoken) return iter->state;
775 }
776 return STATE_AGENT_IDLE;
777}
778
779void LLFloaterAO::onClickPrevStand(void* user_data)
780{
781 if (!(mAOStands.size() > 0)) return;
782 stand_iterator=stand_iterator-1;
783 if (stand_iterator < 0) stand_iterator = int( mAOStands.size()-stand_iterator);
784 if (stand_iterator > int( mAOStands.size()-1)) stand_iterator = 0;
785 cmdline_printchat(llformat("Changing stand to %s.",mAOStands[stand_iterator].anim_name.c_str()));
786 ChangeStand();
787}
788
789void LLFloaterAO::onClickNextStand(void* user_data)
790{
791 if (!(mAOStands.size() > 0)) return;
792 stand_iterator=stand_iterator+1;
793 if (stand_iterator < 0) stand_iterator = int( mAOStands.size()-stand_iterator);
794 if (stand_iterator > int( mAOStands.size()-1)) stand_iterator = 0;
795 cmdline_printchat(llformat("Changing stand to %s.",mAOStands[stand_iterator].anim_name.c_str()));
796 ChangeStand();
797}
798
799BOOL LLFloaterAO::ChangeStand()
800{
801 if (gSavedSettings.getBOOL("AOEnabled"))
802 {
803 if (gAgent.getAvatarObject())
804 {
805 if (gSavedSettings.getBOOL("AONoStandsInMouselook") && gAgent.cameraMouselook()) return FALSE;
806
807 if (gAgent.getAvatarObject()->mIsSitting)
808 {
809// stopMotion(getCurrentStandId(), FALSE, TRUE); //stop stand first then set state
810// if (getAnimationState() != STATE_AGENT_GROUNDSIT) setAnimationState(STATE_AGENT_SIT);
811// setCurrentStandId(LLUUID::null);
812 return FALSE;
813 }
814 }
815 if ((getAnimationState() == STATE_AGENT_IDLE) || (getAnimationState() == STATE_AGENT_STAND))// stands have lowest priority
816 {
817 if (!(mAOStands.size() > 0)) return TRUE;
818 if (gSavedSettings.getBOOL("AOStandRandomize"))
819 {
820 stand_iterator = ll_rand(mAOStands.size()-1);
821 }
822 if (stand_iterator < 0) stand_iterator = int( mAOStands.size()-stand_iterator);
823 if (stand_iterator > int( mAOStands.size()-1)) stand_iterator = 0;
824
825 int stand_iterator_previous = stand_iterator -1;
826
827 if (stand_iterator_previous < 0) stand_iterator_previous = int( mAOStands.size()-1);
828
829 if (mAOStands[stand_iterator].ao_id.notNull())
830 {
831 stopMotion(getCurrentStandId(), FALSE, TRUE); //stop stand first then set state
832 startMotion(mAOStands[stand_iterator].ao_id, 0, TRUE);
833
834 setAnimationState(STATE_AGENT_STAND);
835 setCurrentStandId(mAOStands[stand_iterator].ao_id);
836 if ((sInstance)&&(mcomboBox_stands)) mcomboBox_stands->selectNthItem(stand_iterator);
837// llinfos << "changing stand to " << mAOStands[stand_iterator].anim_name << llendl;
838 return FALSE;
839 }
840 }
841 }
842 else
843 {
844 stopMotion(getCurrentStandId(), FALSE, TRUE);
845 return TRUE; //stop if ao is off
846 }
847 return TRUE;
848}
849
850
851BOOL LLFloaterAO::startMotion(const LLUUID& id, F32 time_offset, BOOL stand)
852{
853 if (stand)
854 {
855 if (id.notNull())
856 {
857 BOOL sitting = FALSE;
858 if (gAgent.getAvatarObject())
859 {
860 sitting = gAgent.getAvatarObject()->mIsSitting;
861 }
862 if (sitting) return FALSE;
863 gAgent.sendAnimationRequest(id, ANIM_REQUEST_START);
864 return TRUE;
865 }
866 }
867 else
868 {
869 if (GetAnimID(id).notNull() && gSavedSettings.getBOOL("AOEnabled"))
870 {
871 stopMotion(getCurrentStandId(), FALSE, TRUE); //stop stand first then set state
872 setAnimationState(GetStateFromAnimID(id));
873
874// llinfos << " state " << getAnimationState() << " start anim " << id << " overriding with " << GetAnimID(id) << llendl;
875 if ((GetStateFromAnimID(id) == STATE_AGENT_SIT) && !(gSavedSettings.getBOOL("AOSitsEnabled"))) return TRUE;
876 gAgent.sendAnimationRequest(GetAnimID(id), ANIM_REQUEST_START);
877 return TRUE;
878 }
879 }
880 return FALSE;
881}
882
883BOOL LLFloaterAO::stopMotion(const LLUUID& id, BOOL stop_immediate, BOOL stand)
884{
885 if (stand)
886 {
887 setAnimationState(STATE_AGENT_IDLE);
888 gAgent.sendAnimationRequest(id, ANIM_REQUEST_STOP);
889 return TRUE;
890 }
891 else
892 {
893 if (GetAnimID(id).notNull() && gSavedSettings.getBOOL("AOEnabled"))
894 {
895// llinfos << " state " << getAnimationState() << "/" << GetStateFromAnimID(id) << "(now 0) stop anim " << id << " overriding with " << GetAnimID(id) << llendl;
896 if (getAnimationState() == GetStateFromAnimID(id))
897 {
898 setAnimationState(STATE_AGENT_IDLE);
899 }
900 ChangeStand(); // startMotion(getCurrentStandId(), 0, TRUE);
901 gAgent.sendAnimationRequest(GetAnimID(id), ANIM_REQUEST_STOP);
902 return TRUE;
903 }
904 }
905 return FALSE;
906}
907
908void LLFloaterAO::onClickReloadCard(void* user_data)
909{
910 if(gInventory.isEverythingFetched())
911 {
912 LLFloaterAO::init();
913 }
914}
915
916void LLFloaterAO::onClickOpenCard(void* user_data)
917{
918 if(gInventory.isEverythingFetched())
919 {
920 LLUUID configncitem = (LLUUID)gSavedPerAccountSettings.getString("AOConfigNotecardID");
921 if (configncitem.notNull())
922 {
923 const LLInventoryItem* item = gInventory.getItem(configncitem);
924 if(item)
925 {
926 if (gAgent.allowOperation(PERM_COPY, item->getPermissions(),GP_OBJECT_MANIPULATE) || gAgent.isGodlike())
927 {
928 if(!item->getAssetUUID().isNull())
929 open_notecard((LLViewerInventoryItem*)item, std::string("Note: ") + item->getName(), LLUUID::null, FALSE);
930 // open_notecard((LLViewerInventoryItem*)item, std::string("Note: ") + item->getName(), LLUUID::null, FALSE, LLUUID::null, FALSE);
931 }
932 }
933 }
934 }
935}
936
937struct AOAssetInfo
938{
939 std::string path;
940 std::string name;
941};
942
943void LLFloaterAO::onNotecardLoadComplete(LLVFS *vfs,const LLUUID& asset_uuid,LLAssetType::EType type,void* user_data, S32 status, LLExtStat ext_status)
944{
945 if(status == LL_ERR_NOERR)
946 {
947 S32 size = vfs->getSize(asset_uuid, type);
948 U8* buffer = new U8[size];
949 vfs->getData(asset_uuid, type, buffer, 0, size);
950
951 if(type == LLAssetType::AT_NOTECARD)
952 {
953 LLViewerTextEditor* edit = new LLViewerTextEditor("",LLRect(0,0,0,0),S32_MAX,"");
954 if(edit->importBuffer((char*)buffer, (S32)size))
955 {
956 llinfos << "ao nc decode success" << llendl;
957 std::string card = edit->getText();
958 edit->die();
959
960 if (mcomboBox_stands)
961 {
962 mcomboBox_stands->clear();
963 mcomboBox_stands->removeall();
964 }
965 if (mcomboBox_walks) mcomboBox_walks->clear();
966 if (mcomboBox_runs) mcomboBox_runs->clear();
967 if (mcomboBox_jumps) mcomboBox_jumps->clear();
968 if (mcomboBox_sits) mcomboBox_sits->clear();
969 if (mcomboBox_gsits) mcomboBox_gsits->clear();
970 if (mcomboBox_crouchs) mcomboBox_cwalks->clear();
971 if (mcomboBox_cwalks) mcomboBox_cwalks->clear();
972 if (mcomboBox_falls) mcomboBox_falls->clear();
973 if (mcomboBox_hovers) mcomboBox_hovers->clear();
974 if (mcomboBox_flys) mcomboBox_flys->clear();
975 if (mcomboBox_flyslows) mcomboBox_flyslows->clear();
976 if (mcomboBox_flyups) mcomboBox_flyups->clear();
977 if (mcomboBox_flydowns) mcomboBox_flydowns->clear();
978 if (mcomboBox_lands) mcomboBox_lands->clear();
979 if (mcomboBox_standups) mcomboBox_standups->clear();
980 if (mcomboBox_prejumps) mcomboBox_prejumps->clear();
981
982
983 struct_stands loader;
984
985 typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
986 boost::char_separator<char> sep("\n");
987 tokenizer tokline(card, sep);
988
989 for (tokenizer::iterator line = tokline.begin(); line != tokline.end(); ++line)
990 {
991// llinfos << *line << llendl;
992 std::string strline(*line);
993// llinfos << "uncommented line: " << strline << llendl;
994
995 boost::regex type("^(\\s*)(\\[ )(.*)( \\])");
996 boost::smatch what;
997 if (boost::regex_search(strline, what, type))
998 {
999// llinfos << "type: " << what[0] << llendl;
1000// llinfos << "anims in type: " << boost::regex_replace(strline, type, "") << llendl;
1001
1002 boost::char_separator<char> sep("|,");
1003 std::string stranimnames(boost::regex_replace(strline, type, ""));
1004 tokenizer tokanimnames(stranimnames, sep);
1005 for (tokenizer::iterator anim = tokanimnames.begin(); anim != tokanimnames.end(); ++anim)
1006 {
1007 std::string strtoken(what[0]);
1008 std::string stranim(*anim);
1009 LLUUID animid(getAssetIDByName(stranim));
1010
1011// llinfos << invfolderid.asString().c_str() << llendl;
1012// llinfos << "anim: " << stranim.c_str() << " assetid: " << animid << llendl;
1013 if (!(animid.notNull()))
1014 {
1015 cmdline_printchat(llformat("Warning: animation '%s' could not be found (Section: %s).",stranim.c_str(),strtoken.c_str()));
1016 }
1017 else
1018 {
1019 switch(GetStateFromToken(strtoken.c_str()))
1020 {
1021 case STATE_AGENT_STAND:
1022 loader.ao_id = animid; loader.anim_name = stranim.c_str(); mAOStands.push_back(loader);
1023 if(mcomboBox_stands != NULL) mcomboBox_stands->add(stranim.c_str(), ADD_BOTTOM, TRUE);
1024 break;
1025 case STATE_AGENT_WALK:
1026 {
1027 if (sInstance && (mcomboBox_walks != NULL))
1028 {
1029 //llinfos << "1 anim: " << stranim.c_str() << " assetid: " << animid << llendl;
1030 if (!(mcomboBox_walks->selectByValue(stranim.c_str()))) mcomboBox_walks->add(stranim.c_str(), ADD_BOTTOM, TRUE); //check if exist
1031 }
1032 }
1033 break;
1034 case STATE_AGENT_RUN:
1035 {
1036 if (sInstance && (mcomboBox_runs != NULL))
1037 {
1038 if (!(mcomboBox_runs->selectByValue(stranim.c_str()))) mcomboBox_runs->add(stranim.c_str(), ADD_BOTTOM, TRUE); //check if exist
1039 }
1040 }
1041 break;
1042 case STATE_AGENT_JUMP:
1043 {
1044 if (sInstance && (mcomboBox_jumps != NULL))
1045 {
1046 if (!(mcomboBox_jumps->selectByValue(stranim.c_str()))) mcomboBox_jumps->add(stranim.c_str(), ADD_BOTTOM, TRUE); //check if exist
1047 }
1048 }
1049 break;
1050 case STATE_AGENT_SIT:
1051 {
1052 if (sInstance && (mcomboBox_sits != NULL))
1053 {
1054 if (!(mcomboBox_sits->selectByValue(stranim.c_str()))) mcomboBox_sits->add(stranim.c_str(), ADD_BOTTOM, TRUE); //check if exist
1055 }
1056 }
1057 break;
1058 case STATE_AGENT_GROUNDSIT:
1059 {
1060 if (sInstance && (mcomboBox_gsits != NULL))
1061 {
1062 if (!(mcomboBox_gsits->selectByValue(stranim.c_str()))) mcomboBox_gsits->add(stranim.c_str(), ADD_BOTTOM, TRUE); //check if exist
1063 }
1064 }
1065 break;
1066 case STATE_AGENT_CROUCH:
1067 {
1068 if (sInstance && (mcomboBox_crouchs != NULL))
1069 {
1070 if (!(mcomboBox_crouchs->selectByValue(stranim.c_str()))) mcomboBox_crouchs->add(stranim.c_str(), ADD_BOTTOM, TRUE); //check if exist
1071 }
1072 }
1073 break;
1074 case STATE_AGENT_CROUCHWALK:
1075 {
1076 if (sInstance && (mcomboBox_cwalks != NULL))
1077 {
1078 if (!(mcomboBox_cwalks->selectByValue(stranim.c_str()))) mcomboBox_cwalks->add(stranim.c_str(), ADD_BOTTOM, TRUE); //check if exist
1079 }
1080 }
1081 break;
1082 case STATE_AGENT_FALLDOWN:
1083 {
1084 if (sInstance && (mcomboBox_falls != NULL))
1085 {
1086 if (!(mcomboBox_falls->selectByValue(stranim.c_str()))) mcomboBox_falls->add(stranim.c_str(), ADD_BOTTOM, TRUE); //check if exist
1087 }
1088 }
1089 break;
1090 case STATE_AGENT_HOVER:
1091 {
1092 if (sInstance && (mcomboBox_hovers != NULL))
1093 {
1094 if (!(mcomboBox_hovers->selectByValue(stranim.c_str()))) mcomboBox_hovers->add(stranim.c_str(), ADD_BOTTOM, TRUE); //check if exist
1095 }
1096 }
1097 break;
1098 case STATE_AGENT_FLY:
1099 {
1100 if (sInstance && (mcomboBox_flys != NULL))
1101 {
1102 if (!(mcomboBox_flys->selectByValue(stranim.c_str()))) mcomboBox_flys->add(stranim.c_str(), ADD_BOTTOM, TRUE); //check if exist
1103 }
1104 }
1105 break;
1106 case STATE_AGENT_FLYSLOW:
1107 {
1108 if (sInstance && (mcomboBox_flyslows != NULL))
1109 {
1110 if (!(mcomboBox_flyslows->selectByValue(stranim.c_str()))) mcomboBox_flyslows->add(stranim.c_str(), ADD_BOTTOM, TRUE); //check if exist
1111 }
1112 }
1113 break;
1114 case STATE_AGENT_HOVER_UP:
1115 {
1116 if (sInstance && (mcomboBox_flyups != NULL))
1117 {
1118 if (!(mcomboBox_flyups->selectByValue(stranim.c_str()))) mcomboBox_flyups->add(stranim.c_str(), ADD_BOTTOM, TRUE); //check if exist
1119 }
1120 }
1121 break;
1122 case STATE_AGENT_HOVER_DOWN:
1123 {
1124 if (sInstance && (mcomboBox_flydowns != NULL))
1125 {
1126 if (!(mcomboBox_flydowns->selectByValue(stranim.c_str()))) mcomboBox_flydowns->add(stranim.c_str(), ADD_BOTTOM, TRUE); //check if exist
1127 }
1128 }
1129 break;
1130 case STATE_AGENT_LAND:
1131 {
1132 if (sInstance && (mcomboBox_lands != NULL))
1133 {
1134 if (!(mcomboBox_lands->selectByValue(stranim.c_str()))) mcomboBox_lands->add(stranim.c_str(), ADD_BOTTOM, TRUE); //check if exist
1135 }
1136 }
1137 break;
1138 case STATE_AGENT_STANDUP:
1139 {
1140 if (sInstance && (mcomboBox_standups != NULL))
1141 {
1142 if (!(mcomboBox_standups->selectByValue(stranim.c_str()))) mcomboBox_standups->add(stranim.c_str(), ADD_BOTTOM, TRUE); //check if exist
1143 }
1144 }
1145 break;
1146 case STATE_AGENT_PRE_JUMP:
1147 {
1148 if (sInstance && (mcomboBox_prejumps != NULL))
1149 {
1150 if (!(mcomboBox_prejumps->selectByValue(stranim.c_str()))) mcomboBox_prejumps->add(stranim.c_str(), ADD_BOTTOM, TRUE); //check if exist
1151 }
1152 }
1153 break;
1154 }
1155 for (std::vector<struct_overrides>::iterator iter = mAOOverrides.begin(); iter != mAOOverrides.end(); ++iter)
1156 {
1157 if (GetStateFromToken(strtoken.c_str()) == iter->state)
1158 {
1159 iter->ao_id = animid;
1160 }
1161 }
1162 }
1163 }
1164 }
1165 }
1166 llinfos << "ao nc read sucess" << llendl;
1167
1168 for (std::vector<struct_overrides>::iterator iter = mAOOverrides.begin(); iter != mAOOverrides.end(); ++iter)
1169 {
1170 switch(iter->state)
1171 {
1172
1173 case STATE_AGENT_WALK:
1174 {
1175 std::string defaultanim = gSavedPerAccountSettings.getString("AODefaultWalk");
1176 SetDefault(mcomboBox_walks,iter->ao_id,defaultanim);
1177 if (getAssetIDByName(defaultanim) != LLUUID::null) iter->ao_id = getAssetIDByName(defaultanim);
1178 }
1179 break;
1180 case STATE_AGENT_RUN:
1181 {
1182 std::string defaultanim = gSavedPerAccountSettings.getString("AODefaultRun");
1183 SetDefault(mcomboBox_runs,iter->ao_id,defaultanim);
1184 if (getAssetIDByName(defaultanim) != LLUUID::null) iter->ao_id = getAssetIDByName(defaultanim);
1185 }
1186 break;
1187 case STATE_AGENT_JUMP:
1188 {
1189 std::string defaultanim = gSavedPerAccountSettings.getString("AODefaultJump");
1190 SetDefault(mcomboBox_jumps,iter->ao_id,defaultanim);
1191 if (getAssetIDByName(defaultanim) != LLUUID::null) iter->ao_id = getAssetIDByName(defaultanim);
1192 }
1193 break;
1194 case STATE_AGENT_SIT:
1195 {
1196 std::string defaultanim = gSavedPerAccountSettings.getString("AODefaultSit");
1197 SetDefault(mcomboBox_sits,iter->ao_id,defaultanim);
1198 if (getAssetIDByName(defaultanim) != LLUUID::null) iter->ao_id = getAssetIDByName(defaultanim);
1199 }
1200 break;
1201 case STATE_AGENT_CROUCH:
1202 {
1203 std::string defaultanim = gSavedPerAccountSettings.getString("AODefaultCrouch");
1204 SetDefault(mcomboBox_crouchs,iter->ao_id,defaultanim);
1205 if (getAssetIDByName(defaultanim) != LLUUID::null) iter->ao_id = getAssetIDByName(defaultanim);
1206 }
1207 break;
1208 case STATE_AGENT_GROUNDSIT:
1209 {
1210 std::string defaultanim = gSavedPerAccountSettings.getString("AODefaultGroundSit");
1211 SetDefault(mcomboBox_gsits,iter->ao_id,defaultanim);
1212 if (getAssetIDByName(defaultanim) != LLUUID::null) iter->ao_id = getAssetIDByName(defaultanim);
1213 }
1214 break;
1215 case STATE_AGENT_CROUCHWALK:
1216 {
1217 std::string defaultanim = gSavedPerAccountSettings.getString("AODefaultCrouchWalk");
1218 SetDefault(mcomboBox_cwalks,iter->ao_id,defaultanim);
1219 if (getAssetIDByName(defaultanim) != LLUUID::null) iter->ao_id = getAssetIDByName(defaultanim);
1220 }
1221 break;
1222 case STATE_AGENT_FALLDOWN:
1223 {
1224 std::string defaultanim = gSavedPerAccountSettings.getString("AODefaultFall");
1225 SetDefault(mcomboBox_falls,iter->ao_id,defaultanim);
1226 if (getAssetIDByName(defaultanim) != LLUUID::null) iter->ao_id = getAssetIDByName(defaultanim);
1227 }
1228 break;
1229 case STATE_AGENT_HOVER:
1230 {
1231 std::string defaultanim = gSavedPerAccountSettings.getString("AODefaultHover");
1232 SetDefault(mcomboBox_hovers,iter->ao_id,defaultanim);
1233 if (getAssetIDByName(defaultanim) != LLUUID::null) iter->ao_id = getAssetIDByName(defaultanim);
1234 }
1235 break;
1236 case STATE_AGENT_FLY:
1237 {
1238 std::string defaultanim = gSavedPerAccountSettings.getString("AODefaultFly");
1239 SetDefault(mcomboBox_flys,iter->ao_id,defaultanim);
1240 if (getAssetIDByName(defaultanim) != LLUUID::null) iter->ao_id = getAssetIDByName(defaultanim);
1241 }
1242 break;
1243 case STATE_AGENT_HOVER_UP:
1244 {
1245 std::string defaultanim = gSavedPerAccountSettings.getString("AODefaultFlyUp");
1246 SetDefault(mcomboBox_flyups,iter->ao_id,defaultanim);
1247 if (getAssetIDByName(defaultanim) != LLUUID::null) iter->ao_id = getAssetIDByName(defaultanim);
1248 }
1249 break;
1250 case STATE_AGENT_FLYSLOW:
1251 {
1252 std::string defaultanim = gSavedPerAccountSettings.getString("AODefaultFlySlow");
1253 SetDefault(mcomboBox_flyslows,iter->ao_id,defaultanim);
1254 if (getAssetIDByName(defaultanim) != LLUUID::null) iter->ao_id = getAssetIDByName(defaultanim);
1255 }
1256 break;
1257 case STATE_AGENT_HOVER_DOWN:
1258 {
1259 std::string defaultanim = gSavedPerAccountSettings.getString("AODefaultFlyDown");
1260 SetDefault(mcomboBox_flydowns,iter->ao_id,defaultanim);
1261 if (getAssetIDByName(defaultanim) != LLUUID::null) iter->ao_id = getAssetIDByName(defaultanim);
1262 }
1263 break;
1264 case STATE_AGENT_LAND:
1265 {
1266 std::string defaultanim = gSavedPerAccountSettings.getString("AODefaultLand");
1267 SetDefault(mcomboBox_lands,iter->ao_id,defaultanim);
1268 if (getAssetIDByName(defaultanim) != LLUUID::null) iter->ao_id = getAssetIDByName(defaultanim);
1269 }
1270 break;
1271 case STATE_AGENT_STANDUP:
1272 {
1273 std::string defaultanim = gSavedPerAccountSettings.getString("AODefaultStandUp");
1274 SetDefault(mcomboBox_standups,iter->ao_id,defaultanim);
1275 if (getAssetIDByName(defaultanim) != LLUUID::null) iter->ao_id = getAssetIDByName(defaultanim);
1276 }
1277 break;
1278 case STATE_AGENT_PRE_JUMP:
1279 {
1280 std::string defaultanim = gSavedPerAccountSettings.getString("AODefaultPreJump");
1281 SetDefault(mcomboBox_prejumps,iter->ao_id,defaultanim);
1282 if (getAssetIDByName(defaultanim) != LLUUID::null) iter->ao_id = getAssetIDByName(defaultanim);
1283 }
1284 break;
1285 }
1286 }
1287 run();
1288 }
1289 else
1290 {
1291 llinfos << "ao nc decode error" << llendl;
1292 }
1293 }
1294 }
1295 else
1296 {
1297 llinfos << "ao nc read error" << llendl;
1298 }
1299}
1300
1301BOOL LLFloaterAO::SetDefault(void* userdata, LLUUID ao_id, std::string defaultanim)
1302{
1303 if (sInstance && (userdata))
1304 {
1305 LLComboBox *box = (LLComboBox *) userdata;
1306 if (LLUUID::null == ao_id)
1307 {
1308 box->clear();
1309 box->removeall();
1310 }
1311 else
1312 {
1313 box->selectByValue(defaultanim);
1314 }
1315 }
1316 return TRUE;
1317}
1318
1319class ObjectNameMatches : public LLInventoryCollectFunctor
1320{
1321public:
1322 ObjectNameMatches(std::string name)
1323 {
1324 sName = name;
1325 }
1326 virtual ~ObjectNameMatches() {}
1327 virtual bool operator()(LLInventoryCategory* cat,
1328 LLInventoryItem* item)
1329 {
1330 if(item)
1331 {
1332 if (item->getParentUUID() == LLFloaterAO::invfolderid)
1333 {
1334 return (item->getName() == sName);
1335 }
1336 return false;
1337 }
1338 return false;
1339 }
1340private:
1341 std::string sName;
1342};
1343
1344const LLUUID& LLFloaterAO::getAssetIDByName(const std::string& name)
1345{
1346 if (name.empty() || !(gInventory.isEverythingFetched())) return LLUUID::null;
1347
1348 LLViewerInventoryCategory::cat_array_t cats;
1349 LLViewerInventoryItem::item_array_t items;
1350 ObjectNameMatches objectnamematches(name);
1351 gInventory.collectDescendentsIf(LLUUID::null,cats,items,FALSE,objectnamematches);
1352
1353 if (items.count())
1354 {
1355 return items[0]->getAssetUUID();
1356 }
1357 return LLUUID::null;
1358};
diff --git a/linden/indra/newview/floaterao.h b/linden/indra/newview/floaterao.h
new file mode 100644
index 0000000..3ab06e0
--- /dev/null
+++ b/linden/indra/newview/floaterao.h
@@ -0,0 +1,127 @@
1
2#ifndef LL_LLFLOATERAO_H
3#define LL_LLFLOATERAO_H
4
5#include "llfloater.h"
6#include "llviewercontrol.h"
7#include "llagent.h"
8
9
10class AONoteCardDropTarget;
11
12const int STATE_AGENT_IDLE = 0;
13const int STATE_AGENT_WALK = 1;
14const int STATE_AGENT_RUN = 2;
15const int STATE_AGENT_STAND = 3;
16
17const int STATE_AGENT_PRE_JUMP = 4;
18const int STATE_AGENT_JUMP = 5;
19const int STATE_AGENT_TURNLEFT = 6;
20const int STATE_AGENT_TURNRIGHT = 7;
21
22const int STATE_AGENT_SIT = 8;
23const int STATE_AGENT_GROUNDSIT = 9;
24
25const int STATE_AGENT_HOVER = 10;
26const int STATE_AGENT_HOVER_DOWN = 11;
27const int STATE_AGENT_HOVER_UP = 12;
28
29const int STATE_AGENT_CROUCH = 13;
30const int STATE_AGENT_CROUCHWALK = 14;
31const int STATE_AGENT_FALLDOWN = 15;
32const int STATE_AGENT_STANDUP = 16;
33const int STATE_AGENT_LAND = 17;
34
35const int STATE_AGENT_FLY = 18;
36const int STATE_AGENT_FLYSLOW = 19;
37
38
39
40
41
42class AOStandTimer : public LLEventTimer
43{
44public:
45 AOStandTimer();
46 ~AOStandTimer();
47 virtual BOOL tick();
48 virtual void reset();
49};
50
51class AOInvTimer : public LLEventTimer
52{
53public:
54 AOInvTimer();
55 ~AOInvTimer();
56 BOOL tick();
57};
58
59class LLFloaterAO : public LLFloater
60{
61public:
62
63 LLFloaterAO();
64 virtual BOOL postBuild();
65 virtual ~LLFloaterAO();
66
67 static void show(void*);
68 static void init();
69
70 static void onClickToggleAO(LLUICtrl *, void*);
71 static void onClickToggleSits(LLUICtrl *, void*);
72 static void run();
73 static void updateLayout(LLFloaterAO* floater);
74
75 static BOOL loadAnims();
76
77 static int getAnimationState();
78 static void setAnimationState(int state);
79 static void setStates(const LLUUID& id, BOOL start);
80
81 static LLUUID getCurrentStandId();
82 static void setCurrentStandId(const LLUUID& id);
83 static int stand_iterator;
84 static BOOL ChangeStand();
85
86 static BOOL startMotion(const LLUUID& id, F32 time_offset = 0.f, BOOL stand = FALSE);
87 static BOOL stopMotion(const LLUUID& id, BOOL stop_immediate, BOOL stand = FALSE);
88
89 static LLUUID GetAnimID(const LLUUID& id);
90
91 static int GetStateFromAnimID(const LLUUID& id);
92 static LLUUID GetAnimIDFromState(const int state);
93 static int GetStateFromToken(std::string strtoken);
94
95 static void onClickLess(void* data) ;
96 static void onClickMore(void* data) ;
97
98 static void onClickPrevStand(void* userdata);
99 static void onClickNextStand(void* userdata);
100 static void onClickReloadCard(void* userdata);
101 static void onClickOpenCard(void* userdata);
102
103
104 static LLUUID invfolderid;
105 static const LLUUID& getAssetIDByName(const std::string& name);
106
107private:
108
109 static LLFloaterAO* sInstance;
110 static int mAnimationState;
111 static LLUUID mCurrentStandId;
112
113 static AONoteCardDropTarget* mAOItemDropTarget;
114 static void AOItemDrop(LLViewerInventoryItem* item);
115 static void onSpinnerCommit(LLUICtrl* ctrl, void* userdata);
116 static void onComboBoxCommit(LLUICtrl* ctrl, void* userdata);
117 static BOOL SetDefault(void *userdata, LLUUID ao_id, std::string defaultanim);
118
119 BOOL mDirty;
120
121protected:
122
123 static void onNotecardLoadComplete(LLVFS *vfs,const LLUUID& asset_uuid,LLAssetType::EType type,void* user_data, S32 status, LLExtStat ext_status);
124
125};
126
127#endif \ No newline at end of file
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp
index 0a1bd98..18475c6 100644
--- a/linden/indra/newview/llagent.cpp
+++ b/linden/indra/newview/llagent.cpp
@@ -67,6 +67,7 @@
67#include "llface.h" 67#include "llface.h"
68#include "llfirstuse.h" 68#include "llfirstuse.h"
69#include "llfloater.h" 69#include "llfloater.h"
70#include "floaterao.h"
70#include "llfloateractivespeakers.h" 71#include "llfloateractivespeakers.h"
71#include "llfloateravatarinfo.h" 72#include "llfloateravatarinfo.h"
72#include "llfloaterbuildoptions.h" 73#include "llfloaterbuildoptions.h"
@@ -4069,6 +4070,7 @@ void LLAgent::changeCameraToMouselook(BOOL animate)
4069 if( mCameraMode != CAMERA_MODE_MOUSELOOK ) 4070 if( mCameraMode != CAMERA_MODE_MOUSELOOK )
4070 { 4071 {
4071 gFocusMgr.setKeyboardFocus( NULL ); 4072 gFocusMgr.setKeyboardFocus( NULL );
4073 if (gSavedSettings.getBOOL("AONoStandsInMouselook")) LLFloaterAO::stopMotion(LLFloaterAO::getCurrentStandId(), FALSE,TRUE);
4072 4074
4073 mLastCameraMode = mCameraMode; 4075 mLastCameraMode = mCameraMode;
4074 mCameraMode = CAMERA_MODE_MOUSELOOK; 4076 mCameraMode = CAMERA_MODE_MOUSELOOK;
@@ -6030,7 +6032,7 @@ bool LLAgent::teleportCore(bool is_local)
6030 if(TELEPORT_NONE != mTeleportState) 6032 if(TELEPORT_NONE != mTeleportState)
6031 { 6033 {
6032 llwarns << "Attempt to teleport when already teleporting." << llendl; 6034 llwarns << "Attempt to teleport when already teleporting." << llendl;
6033 return false; 6035 //return false; //This seems to fix getting stuck in TPs in the first place. --Liny
6034 } 6036 }
6035 6037
6036#if 0 6038#if 0
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index 0aec752..7a2cddf 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -81,6 +81,7 @@
81#include "llface.h" 81#include "llface.h"
82#include "llfirstuse.h" 82#include "llfirstuse.h"
83#include "llfloater.h" 83#include "llfloater.h"
84#include "floaterao.h"
84#include "llfloaterabout.h" 85#include "llfloaterabout.h"
85#include "llfloaterbuycurrency.h" 86#include "llfloaterbuycurrency.h"
86#include "llfloateractivespeakers.h" 87#include "llfloateractivespeakers.h"
@@ -8596,6 +8597,16 @@ class LLAdvancedTogglePhantom: public view_listener_t
8596 8597
8597}; 8598};
8598 8599
8600
8601class LLAO : public view_listener_t
8602{
8603 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
8604 {
8605 LLFloaterAO::show(NULL);
8606 return true;
8607 }
8608};
8609
8599class LLAdvancedCheckPhantom: public view_listener_t 8610class LLAdvancedCheckPhantom: public view_listener_t
8600{ 8611{
8601 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 8612 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -10732,6 +10743,7 @@ void initialize_menus()
10732 addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent"); 10743 addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent");
10733 addMenu(new LLViewCheckRenderType(), "View.CheckRenderType"); 10744 addMenu(new LLViewCheckRenderType(), "View.CheckRenderType");
10734 addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments"); 10745 addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments");
10746 addMenu(new LLAO(), "View.AO");
10735 addMenu(new LLViewCheckAdvanced(), "View.CheckAdvanced"); 10747 addMenu(new LLViewCheckAdvanced(), "View.CheckAdvanced");
10736 10748
10737 // World menu 10749 // World menu
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp
index 10e2ec7..5350d78 100644
--- a/linden/indra/newview/llvoavatar.cpp
+++ b/linden/indra/newview/llvoavatar.cpp
@@ -46,6 +46,7 @@
46#include "lldriverparam.h" 46#include "lldriverparam.h"
47#include "lleditingmotion.h" 47#include "lleditingmotion.h"
48#include "llemote.h" 48#include "llemote.h"
49#include "floaterao.h"
49#include "llfirstuse.h" 50#include "llfirstuse.h"
50#include "llheadrotmotion.h" 51#include "llheadrotmotion.h"
51#include "llhudeffecttrail.h" 52#include "llhudeffecttrail.h"
@@ -5212,6 +5213,14 @@ void LLVOAvatar::processAnimationStateChanges()
5212 // playing, but not signaled, so stop 5213 // playing, but not signaled, so stop
5213 if (found_anim == mSignaledAnimations.end()) 5214 if (found_anim == mSignaledAnimations.end())
5214 { 5215 {
5216 if (mIsSelf)
5217 {
5218 if ((gSavedSettings.getBOOL("AOEnabled")) && LLFloaterAO::stopMotion(anim_it->first, FALSE)) // if the AO replaced this anim serverside then stop it serverside
5219 {
5220// return TRUE; //no local stop needed
5221 }
5222 }
5223
5215 processSingleAnimationStateChange(anim_it->first, FALSE); 5224 processSingleAnimationStateChange(anim_it->first, FALSE);
5216 mPlayingAnimations.erase(anim_it++); 5225 mPlayingAnimations.erase(anim_it++);
5217 continue; 5226 continue;
@@ -5230,6 +5239,19 @@ void LLVOAvatar::processAnimationStateChanges()
5230 { 5239 {
5231 if (processSingleAnimationStateChange(anim_it->first, TRUE)) 5240 if (processSingleAnimationStateChange(anim_it->first, TRUE))
5232 { 5241 {
5242
5243 if (mIsSelf) // AO is only for ME
5244 {
5245 if (gSavedSettings.getBOOL("EmeraldAOEnabled"))
5246 {
5247 if (LLFloaterAO::startMotion(anim_it->first, 0,FALSE)) // AO overrides the anim if needed
5248 {
5249// return TRUE; // not playing it locally
5250 }
5251 }
5252 }
5253
5254
5233 mPlayingAnimations[anim_it->first] = anim_it->second; 5255 mPlayingAnimations[anim_it->first] = anim_it->second;
5234 ++anim_it; 5256 ++anim_it;
5235 continue; 5257 continue;
@@ -5427,6 +5449,11 @@ void LLVOAvatar::stopMotionFromSource(const LLUUID& source_id)
5427//----------------------------------------------------------------------------- 5449//-----------------------------------------------------------------------------
5428LLVector3 LLVOAvatar::getVolumePos(S32 joint_index, LLVector3& volume_offset) 5450LLVector3 LLVOAvatar::getVolumePos(S32 joint_index, LLVector3& volume_offset)
5429{ 5451{
5452 if(joint_index < 0)
5453 {
5454 return LLVector3::zero;
5455 }
5456
5430 if (joint_index > mNumCollisionVolumes) 5457 if (joint_index > mNumCollisionVolumes)
5431 { 5458 {
5432 return LLVector3::zero; 5459 return LLVector3::zero;
@@ -6615,6 +6642,7 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object)
6615 6642
6616 gPipeline.markMoved(mDrawable, TRUE); 6643 gPipeline.markMoved(mDrawable, TRUE);
6617 mIsSitting = TRUE; 6644 mIsSitting = TRUE;
6645 LLFloaterAO::ChangeStand();
6618// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.1d 6646// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.1d
6619 #ifdef RLV_EXTENSION_STARTLOCATION 6647 #ifdef RLV_EXTENSION_STARTLOCATION
6620 if (rlv_handler_t::isEnabled()) 6648 if (rlv_handler_t::isEnabled())
diff --git a/linden/indra/newview/skins/default/xui/de/floater_ao.xml b/linden/indra/newview/skins/default/xui/de/floater_ao.xml
new file mode 100644
index 0000000..c0731ea
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/de/floater_ao.xml
@@ -0,0 +1,95 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2<floater name="geminifloater" title="Animation Overrider">
3 <view_border name="ao_notecard"/>
4 <view_border name="ao_notecard_vis"/>
5 <text name="Give inventory" tool_tip="ZHAO Notiz hier fallen lassen. Konfiguration und Animationen müssen im gleichen Inventar Ordner liegen!">
6 ZHAO II Konfiguration hier fallen lassen.
7 </text>
8 <view_border name="ao_notecard_disp"/>
9 <text name="ao_nc_text" tool_tip="">
10 Aktuell: ITEM
11 </text>
12 <button name="opencard" label="Laden"/>
13 <button name="reloadcard" label="Neuladen"/>
14 <button label="Mehr &gt;&gt;" name="more_btn" tool_tip="Erweiterte Optionen"/>
15 <button label="&lt;&lt; Weniger" name="less_btn" tool_tip="Erweiterte Optionen"/>
16 <check_box label="Anims übersteuern" name="EmeraldAOEnabled"/>
17 <check_box label="Sitzen übersteuern" name="EmeraldAOSitsEnabled"/>
18 <text name="buttons_desc">
19 Stand:
20 </text>
21 <combo_box name="stands" label=""/>
22 <button name="prevstand" tool_tip="vorheriger Stand" label="&lt;&lt;"/>
23 <button name="nextstand" tool_tip="nächster Stand" label="&gt;&gt;"/>
24 <check_box label="zufällige Stand Ani" name="EmeraldAOStandRandomize"/>
25 <check_box label="keine Stand Ani bei Mouselook" name="EmeraldAONoStandsInMouselook"/>
26 <spinner name="standtime" label="Stand Zeit" tool_tip="AO Stand zeit in Sekunden"/>
27 <tab_container label="Default" name="tabcontainer">
28 <panel label="Standard Anis" name="tabdefaultanims">
29 <text name="textdefaultwalk">
30 Standard Gang:
31 </text>
32 <combo_box name="walks" label=""/>
33 <text name="textdefaultrun">
34 Standard Rennen:
35 </text>
36 <combo_box name="runs" label=""/>
37 <text name="textdefaultjump">
38 Standard Sprung:
39 </text>
40 <combo_box name="jumps" label=""/>
41 <text name="textdefaultsit">
42 Standard sitzen:
43 </text>
44 <combo_box name="sits" label=""/>
45 <text name="textdefaultgsit">
46 Standard Bodensitz:
47 </text>
48 <combo_box name="gsits" label=""/>
49 <text name="textdefaultcrouch">
50 Standard geduckt:
51 </text>
52 <combo_box name="crouchs" label=""/>
53 <text name="textdefaultcrouchwalk">
54 Standard geduckt Gang:
55 </text>
56 <combo_box name="cwalks" label=""/>
57 <text name="textdefaultfall">
58 Standard fallen:
59 </text>
60 <combo_box name="falls" label=""/>
61 <text name="textdefaulthover">
62 Standard scheweben:
63 </text>
64 <combo_box name="hovers" label=""/>
65 <text name="textdefaultfly">
66 Standard fliegen:
67 </text>
68 <combo_box name="flys" label=""/>
69 <text name="textdefaultflyslow">
70 Standard langsam fliegen:
71 </text>
72 <combo_box name="flyslows" label=""/>
73 <text name="textdefaultflyup">
74 Standard aufwärts fliegen:
75 </text>
76 <combo_box name="flyups" label=""/>
77 <text name="textdefaultflydown">
78 Standard abwärts fliegen:
79 </text>
80 <combo_box name="flydowns" label=""/>
81 <text name="textdefaultland">
82 Standard landen:
83 </text>
84 <combo_box name="lands" label=""/>
85 <text name="textdefaultstandup">
86 Standard aufstehen:
87 </text>
88 <combo_box name="standups" label=""/>
89 <text name="textdefaultprejump">
90 Standard Pre-Sprung:
91 </text>
92 <combo_box name="prejumps" label=""/>
93 </panel>
94</tab_container>
95</floater> \ No newline at end of file
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_ao.xml b/linden/indra/newview/skins/default/xui/en-us/floater_ao.xml
new file mode 100644
index 0000000..8210b1b
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_ao.xml
@@ -0,0 +1,231 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2<floater
3 name="geminifloater"
4 rect_control="EmeraldAORect"
5 title="Animation Overrider"
6 can_resize="false"
7 can_minimize="true"
8 can_close="true"
9 can_drag_on_left="false"
10 width="610"
11 height="380">
12
13 <view_border blevel_style="in" border_thickness="0" bottom="-380" follows="left|top" height="380" left="1"
14 mouse_opaque="false" name="ao_notecard" width="610" />
15 <view_border blevel_style="in" bottom="340" follows="left|top" height="16" left="10"
16 mouse_opaque="false" name="ao_notecard_vis" width="180" />
17 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
18 bottom_delta="0" drop_shadow_visible="true" follows="left|top"
19 font="SansSerifSmall" h_pad="0" halign="center" height="16" left_delta="0"
20 mouse_opaque="true" name="Give inventory"
21 tool_tip="Drop a ZHAO notecard here. Animations have to be in the same Inventory folder as the notecard." v_pad="2"
22 width="180">
23 Drop a ZHAO II Notecard here.
24 </text>
25 <view_border blevel_style="in" bottom_delta="-18" follows="left|top" height="16" left_delta="0"
26 mouse_opaque="false" name="ao_notecard_disp" width="180" />
27 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
28 bottom_delta="0" drop_shadow_visible="true" follows="left|top"
29 font="SansSerifSmall" h_pad="0" halign="center" height="16" left_delta="0"
30 mouse_opaque="true" name="ao_nc_text"
31 tool_tip="" v_pad="2"
32 width="180">
33 Currently set to: ITEM
34 </text>
35
36 <button
37 name="opencard"
38 label="Open"
39 font="SansSerifSmall"
40 left="10"
41 bottom_delta="-30"
42 width="58"
43 height="20"
44 follows="bottom|left"
45 />
46 <button
47 name="reloadcard"
48 label="Reload"
49 font="SansSerifSmall"
50 left="70"
51 bottom_delta="0"
52 width="58"
53 height="20"
54 follows="bottom|left"
55 />
56 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" halign="center"
57 height="20" label="More &gt;&gt;" left="130"
58 mouse_opaque="true" name="more_btn" scale_image="TRUE"
59 tool_tip="Advanced Options" width="58" />
60 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" halign="center"
61 height="20" label="&lt;&lt; Less" left_delta="0"
62 mouse_opaque="true" name="less_btn" scale_image="TRUE"
63 tool_tip="Advanced Options" width="58" />
64
65
66 <check_box bottom_delta="-42" control_name="EmeraldAOEnabled" enabled="true"
67 follows="left|top" font="SansSerifSmall" height="16" initial_value="false" label="Override Anims" left="10"
68 mouse_opaque="true" name="EmeraldAOEnabled" radio_style="false" width="90" />
69 <check_box bottom_delta="0" control_name="EmeraldAOSitsEnabled" enabled="true"
70 follows="left|top" font="SansSerifSmall" height="16" initial_value="true" label="Override Sits" left="110"
71 mouse_opaque="true" name="EmeraldAOSitsEnabled" radio_style="false" width="90" />
72
73 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
74 bottom_delta="-20" drop_shadow_visible="true" follows="left|bottom"
75 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
76 mouse_opaque="true" name="buttons_desc" v_pad="0" width="180">
77 Stands:
78 </text>
79 <combo_box name="stands" label="" follows="left|top" height="20" left="10" width="180" bottom_delta="-20"/>
80 <button
81 name="prevstand"
82 tool_tip="previous stand"
83 label="&lt;&lt;"
84 font="SansSerifSmall"
85 left="10"
86 bottom_delta="-25"
87 width="90"
88 height="20"
89 follows="bottom|left"
90 />
91 <button
92 name="nextstand"
93 tool_tip="next stand"
94 label="&gt;&gt;"
95 font="SansSerifSmall"
96 left="100"
97 bottom_delta="0"
98 width="90"
99 height="20"
100 follows="bottom|left"
101 />
102 <check_box bottom_delta="-20" control_name="EmeraldAOStandRandomize" enabled="true"
103 follows="left|top" font="SansSerifSmall" height="16" initial_value="false" label="Randomize Stand Order" left="10"
104 mouse_opaque="true" name="EmeraldAOStandRandomize" radio_style="false" width="200" />
105 <check_box bottom_delta="-20" control_name="EmeraldAONoStandsInMouselook" enabled="true"
106 follows="left|top" font="SansSerifSmall" height="16" initial_value="true" label="Disable Stands in Mouselook" left="10"
107 mouse_opaque="true" name="EmeraldAONoStandsInMouselook" radio_style="false" width="180" />
108 <spinner bottom_delta="-20" decimal_digits="2" follows="left|top" height="16" control_name="EmeraldAOStandInterval"
109 increment="1" initial_val="20" left="10" max_val="9000" min_val="1.00"
110 mouse_opaque="true" name="standtime" label="Stand Time" label_width="80"
111 tool_tip="AO Stand Time in seconds" width="180" />
112
113 <tab_container label="Default" bottom="6" left="210" mouse_opaque="false" name="tabcontainer" tab_min_width="50" tab_position="top" width="390" height="350" bg_opaque_color="0,0,0,0.0">
114 <panel border="true" left="0" bottom="0" follows="left|top|right|bottom" height="350" label="Default Anims" mouse_opaque="true" name="tabdefaultanims" width="390">
115
116 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
117 bottom_delta="-40" drop_shadow_visible="true" follows="left|bottom"
118 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
119 mouse_opaque="true" name="textdefaultwalk" v_pad="0" width="180">
120 Default Walk:
121 </text>
122 <combo_box name="walks" label="" follows="left|top" height="20" left="10" width="180" bottom_delta="0" control_name="EmeraldAODefaultWalk" />
123
124 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
125 bottom_delta="-40" drop_shadow_visible="true" follows="left|bottom"
126 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
127 mouse_opaque="true" name="textdefaultrun" v_pad="0" width="180">
128 Default Run:
129 </text>
130 <combo_box name="runs" label="" follows="left|top" height="20" left="10" width="180" bottom_delta="0" control_name="EmeraldAODefaultRun" />
131 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
132 bottom_delta="-40" drop_shadow_visible="true" follows="left|bottom"
133 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
134 mouse_opaque="true" name="textdefaultjump" v_pad="0" width="180">
135 Default Jump:
136 </text>
137 <combo_box name="jumps" label="" follows="left|top" height="20" left="10" width="180" bottom_delta="0" control_name="EmeraldAODefaultJump" />
138 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
139 bottom_delta="-40" drop_shadow_visible="true" follows="left|bottom"
140 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
141 mouse_opaque="true" name="textdefaultsit" v_pad="0" width="180">
142 Default Sit:
143 </text>
144 <combo_box name="sits" label="" follows="left|top" height="20" left="10" width="180" bottom_delta="0" control_name="EmeraldAODefaultSit" />
145 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
146 bottom_delta="-40" drop_shadow_visible="true" follows="left|bottom"
147 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
148 mouse_opaque="true" name="textdefaultgsit" v_pad="0" width="180">
149 Default Groundsit:
150 </text>
151 <combo_box name="gsits" label="" follows="left|top" height="20" left="10" width="180" bottom_delta="0" control_name="EmeraldAODefaultGroundSit" />
152 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
153 bottom_delta="-40" drop_shadow_visible="true" follows="left|bottom"
154 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
155 mouse_opaque="true" name="textdefaultcrouch" v_pad="0" width="180">
156 Default Crouch:
157 </text>
158 <combo_box name="crouchs" label="" follows="left|top" height="20" left="10" width="180" bottom_delta="0" control_name="EmeraldAODefaultCrouch" />
159 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
160 bottom_delta="-40" drop_shadow_visible="true" follows="left|bottom"
161 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
162 mouse_opaque="true" name="textdefaultcrouchwalk" v_pad="0" width="180">
163 Default Crouchwalk:
164 </text>
165 <combo_box name="cwalks" label="" follows="left|top" height="20" left="10" width="180" bottom_delta="0" control_name="EmeraldAODefaultCrouchWalk" />
166 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
167 bottom_delta="-40" drop_shadow_visible="true" follows="left|bottom"
168 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
169 mouse_opaque="true" name="textdefaultfall" v_pad="0" width="180">
170 Default Fall:
171 </text>
172 <combo_box name="falls" label="" follows="left|top" height="20" left="10" width="180" bottom_delta="0" control_name="EmeraldAODefaultFall" />
173 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
174 bottom_delta="280" drop_shadow_visible="true" follows="left|bottom"
175 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="200"
176 mouse_opaque="true" name="textdefaulthover" v_pad="0" width="180">
177 Default Hover:
178 </text>
179 <combo_box name="hovers" label="" follows="left|top" height="20" left_delta="0" width="180" bottom_delta="0" control_name="EmeraldAODefaultHover" />
180 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
181 bottom_delta="-40" drop_shadow_visible="true" follows="left|bottom"
182 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="0"
183 mouse_opaque="true" name="textdefaultfly" v_pad="0" width="180">
184 Default Fly:
185 </text>
186 <combo_box name="flys" label="" follows="left|top" height="20" left_delta="0" width="180" bottom_delta="0" control_name="EmeraldAODefaultFly" />
187 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
188 bottom_delta="-40" drop_shadow_visible="true" follows="left|bottom"
189 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="0"
190 mouse_opaque="true" name="textdefaultflyslow" v_pad="0" width="180">
191 Default Slow Fly:
192 </text>
193 <combo_box name="flyslows" label="" follows="left|top" height="20" left_delta="0" width="180" bottom_delta="0" control_name="EmeraldAODefaultFlySlow" />
194 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
195 bottom_delta="-40" drop_shadow_visible="true" follows="left|bottom"
196 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="0"
197 mouse_opaque="true" name="textdefaultflyup" v_pad="0" width="180">
198 Default Upward Fly:
199 </text>
200 <combo_box name="flyups" label="" follows="left|top" height="20" left_delta="0" width="180" bottom_delta="0" control_name="EmeraldAODefaultFlyUp" />
201 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
202 bottom_delta="-40" drop_shadow_visible="true" follows="left|bottom"
203 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="0"
204 mouse_opaque="true" name="textdefaultflydown" v_pad="0" width="180">
205 Default Downward Fly:
206 </text>
207 <combo_box name="flydowns" label="" follows="left|top" height="20" left_delta="0" width="180" bottom_delta="0" control_name="EmeraldAODefaultFlyDown" />
208 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
209 bottom_delta="-40" drop_shadow_visible="true" follows="left|bottom"
210 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="0"
211 mouse_opaque="true" name="textdefaultland" v_pad="0" width="180">
212 Default Land:
213 </text>
214 <combo_box name="lands" label="" follows="left|top" height="20" left_delta="0" width="180" bottom_delta="0" control_name="EmeraldAODefaultLand" />
215 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
216 bottom_delta="-40" drop_shadow_visible="true" follows="left|bottom"
217 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="0"
218 mouse_opaque="true" name="textdefaultstandup" v_pad="0" width="180">
219 Default Standup:
220 </text>
221 <combo_box name="standups" label="" follows="left|top" height="20" left_delta="0" width="180" bottom_delta="0" control_name="EmeraldAODefaultStandUp" />
222 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
223 bottom_delta="-40" drop_shadow_visible="true" follows="left|bottom"
224 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="0"
225 mouse_opaque="true" name="textdefaultprejump" v_pad="0" width="180">
226 Default Pre-Jump:
227 </text>
228 <combo_box name="prejumps" label="" follows="left|top" height="20" left_delta="0" width="180" bottom_delta="0" control_name="EmeraldAODefaultPreJump" />
229 </panel>
230</tab_container>
231</floater> \ No newline at end of file
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
index 9c02f07..8f213c8 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
@@ -346,6 +346,11 @@
346 <on_check control="ShowMiniMap" /> 346 <on_check control="ShowMiniMap" />
347 </menu_item_check> 347 </menu_item_check>
348 <menu_item_separator /> 348 <menu_item_separator />
349 <menu_item_check label="AO" name="AO"
350 shortcut="control|shift|O">
351 <on_click function="View.AO" userdata="" />
352 </menu_item_check>
353 <menu_item_separator />
349 <menu_item_check name="Statistics Bar" label="Statistics Bar" 354 <menu_item_check name="Statistics Bar" label="Statistics Bar"
350 shortcut="control|shift|1"> 355 shortcut="control|shift|1">
351 <on_click function="ShowFloater" userdata="stat bar" /> 356 <on_click function="ShowFloater" userdata="stat bar" />