diff options
-rw-r--r-- | ChangeLog.txt | 9 | ||||
-rw-r--r-- | linden/indra/newview/llagent.cpp | 30 | ||||
-rw-r--r-- | linden/indra/newview/llagent.h | 7 | ||||
-rw-r--r-- | linden/indra/newview/llappviewer.cpp | 7 | ||||
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 32 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | 5 |
6 files changed, 89 insertions, 1 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index 16e09a6..2849ff6 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -5,6 +5,15 @@ | |||
5 | modified: linden/indra/newview/llviewermenu.cpp | 5 | modified: linden/indra/newview/llviewermenu.cpp |
6 | modified: linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | 6 | modified: linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml |
7 | 7 | ||
8 | |||
9 | * Ported phantom avatar option from Emerald viewer. | ||
10 | |||
11 | modified: linden/indra/newview/llagent.cpp | ||
12 | modified: linden/indra/newview/llagent.h | ||
13 | modified: linden/indra/newview/llappviewer.cpp | ||
14 | modified: linden/indra/newview/llviewermenu.cpp | ||
15 | modified: linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | ||
16 | |||
8 | 17 | ||
9 | 2009-09-04 McCabe Maxsted <hakushakukun@gmail.com> | 18 | 2009-09-04 McCabe Maxsted <hakushakukun@gmail.com> |
10 | 19 | ||
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 5f0a875..7a70316 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp | |||
@@ -232,6 +232,7 @@ LLAgent gAgent; | |||
232 | // Statics | 232 | // Statics |
233 | // | 233 | // |
234 | BOOL LLAgent::sDebugDisplayTarget = FALSE; | 234 | BOOL LLAgent::sDebugDisplayTarget = FALSE; |
235 | BOOL LLAgent::sPhantom = FALSE; | ||
235 | 236 | ||
236 | const F32 LLAgent::TYPING_TIMEOUT_SECS = 5.f; | 237 | const F32 LLAgent::TYPING_TIMEOUT_SECS = 5.f; |
237 | 238 | ||
@@ -835,6 +836,35 @@ void LLAgent::toggleFlying() | |||
835 | 836 | ||
836 | 837 | ||
837 | //----------------------------------------------------------------------------- | 838 | //----------------------------------------------------------------------------- |
839 | // togglePhantom() | ||
840 | //----------------------------------------------------------------------------- | ||
841 | void LLAgent::togglePhantom() | ||
842 | { | ||
843 | BOOL phan = !(sPhantom); | ||
844 | |||
845 | setPhantom( phan ); | ||
846 | } | ||
847 | |||
848 | |||
849 | //----------------------------------------------------------------------------- | ||
850 | // setPhantom() lgg | ||
851 | //----------------------------------------------------------------------------- | ||
852 | void LLAgent::setPhantom(BOOL phantom) | ||
853 | { | ||
854 | sPhantom = phantom; | ||
855 | } | ||
856 | |||
857 | |||
858 | //----------------------------------------------------------------------------- | ||
859 | // getPhantom() lgg | ||
860 | //----------------------------------------------------------------------------- | ||
861 | BOOL LLAgent::getPhantom() | ||
862 | { | ||
863 | return sPhantom; | ||
864 | } | ||
865 | |||
866 | |||
867 | //----------------------------------------------------------------------------- | ||
838 | // setRegion() | 868 | // setRegion() |
839 | //----------------------------------------------------------------------------- | 869 | //----------------------------------------------------------------------------- |
840 | void LLAgent::setRegion(LLViewerRegion *regionp) | 870 | void LLAgent::setRegion(LLViewerRegion *regionp) |
diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h index a4a930f..0b8463f 100644 --- a/linden/indra/newview/llagent.h +++ b/linden/indra/newview/llagent.h | |||
@@ -371,6 +371,11 @@ public: | |||
371 | // Does this parcel allow you to fly? | 371 | // Does this parcel allow you to fly? |
372 | BOOL canFly(); | 372 | BOOL canFly(); |
373 | 373 | ||
374 | //lgg crap | ||
375 | static BOOL getPhantom();// const { return emeraldPhantom; } | ||
376 | static void setPhantom(BOOL phantom); | ||
377 | static void togglePhantom(); | ||
378 | |||
374 | // Animation functions | 379 | // Animation functions |
375 | void stopCurrentAnimations(); | 380 | void stopCurrentAnimations(); |
376 | void requestStopMotion( LLMotion* motion ); | 381 | void requestStopMotion( LLMotion* motion ); |
@@ -801,6 +806,8 @@ private: | |||
801 | LLVector3d mCameraSmoothingLastPositionGlobal; | 806 | LLVector3d mCameraSmoothingLastPositionGlobal; |
802 | LLVector3d mCameraSmoothingLastPositionAgent; | 807 | LLVector3d mCameraSmoothingLastPositionAgent; |
803 | BOOL mCameraSmoothingStop; | 808 | BOOL mCameraSmoothingStop; |
809 | |||
810 | static BOOL sPhantom; | ||
804 | 811 | ||
805 | 812 | ||
806 | //Ventrella | 813 | //Ventrella |
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index 4d53c88..0f1bfb4 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp | |||
@@ -3126,7 +3126,12 @@ void LLAppViewer::idle() | |||
3126 | { | 3126 | { |
3127 | // Send avatar and camera info | 3127 | // Send avatar and camera info |
3128 | last_control_flags = gAgent.getControlFlags(); | 3128 | last_control_flags = gAgent.getControlFlags(); |
3129 | send_agent_update(TRUE); | 3129 | |
3130 | if(!gAgent.getPhantom()) | ||
3131 | { | ||
3132 | send_agent_update(TRUE); | ||
3133 | } | ||
3134 | |||
3130 | agent_update_timer.reset(); | 3135 | agent_update_timer.reset(); |
3131 | } | 3136 | } |
3132 | } | 3137 | } |
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 727f357..3be857e 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -7583,6 +7583,36 @@ class LLAdvancedToggleSit: public view_listener_t | |||
7583 | }; | 7583 | }; |
7584 | 7584 | ||
7585 | 7585 | ||
7586 | ///////////// | ||
7587 | // PHANTOM // | ||
7588 | ///////////// | ||
7589 | |||
7590 | class LLAdvancedTogglePhantom: public view_listener_t | ||
7591 | { | ||
7592 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
7593 | { | ||
7594 | LLAgent::togglePhantom(); | ||
7595 | BOOL ph = LLAgent::getPhantom(); | ||
7596 | LLChat chat; | ||
7597 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
7598 | chat.mText = llformat("%s%s","Phantom ",(ph ? "On" : "Off")); | ||
7599 | LLFloaterChat::addChat(chat); | ||
7600 | //gMenuHolder->findControl(userdata["control"].asString())->setValue(ph); | ||
7601 | return true; | ||
7602 | } | ||
7603 | |||
7604 | }; | ||
7605 | |||
7606 | class LLAdvancedCheckPhantom: public view_listener_t | ||
7607 | { | ||
7608 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
7609 | { | ||
7610 | gMenuHolder->findControl(userdata["control"].asString())->setValue(LLAgent::getPhantom()); | ||
7611 | return true; | ||
7612 | } | ||
7613 | }; | ||
7614 | |||
7615 | |||
7586 | /////////////////////// | 7616 | /////////////////////// |
7587 | // CLEAR GROUP CACHE // | 7617 | // CLEAR GROUP CACHE // |
7588 | /////////////////////// | 7618 | /////////////////////// |
@@ -9599,6 +9629,8 @@ void initialize_menus() | |||
9599 | addMenu(new LLWorldSetAway(), "World.SetAway"); | 9629 | addMenu(new LLWorldSetAway(), "World.SetAway"); |
9600 | addMenu(new LLWorldSetBusy(), "World.SetBusy"); | 9630 | addMenu(new LLWorldSetBusy(), "World.SetBusy"); |
9601 | addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit"); | 9631 | addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit"); |
9632 | addMenu(new LLAdvancedTogglePhantom(), "Advanced.TogglePhantom"); | ||
9633 | addMenu(new LLAdvancedCheckPhantom(), "Advanced.CheckPhantom"); | ||
9602 | 9634 | ||
9603 | addMenu(new LLWorldEnableCreateLandmark(), "World.EnableCreateLandmark"); | 9635 | addMenu(new LLWorldEnableCreateLandmark(), "World.EnableCreateLandmark"); |
9604 | addMenu(new LLWorldEnableSetHomeLocation(), "World.EnableSetHomeLocation"); | 9636 | addMenu(new LLWorldEnableSetHomeLocation(), "World.EnableSetHomeLocation"); |
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 5ac1620..86b5315 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 | |||
@@ -888,6 +888,11 @@ | |||
888 | shortcut="control|alt|s"> | 888 | shortcut="control|alt|s"> |
889 | <on_click function="Advanced.ToggleSit" userdata="" /> | 889 | <on_click function="Advanced.ToggleSit" userdata="" /> |
890 | </menu_item_call> | 890 | </menu_item_call> |
891 | <menu_item_check label="Phantom Avatar" name="Phantom" | ||
892 | shortcut="control|alt|p"> | ||
893 | <on_click function="Advanced.TogglePhantom" userdata="" /> | ||
894 | <on_check function="Advanced.CheckPhantom" userdata="" /> | ||
895 | </menu_item_check> | ||
891 | <menu_item_check name="Show Mouselook Crosshairs" | 896 | <menu_item_check name="Show Mouselook Crosshairs" |
892 | label="Show Mouselook Crosshairs"> | 897 | label="Show Mouselook Crosshairs"> |
893 | <on_click function="ToggleControl" | 898 | <on_click function="ToggleControl" |