diff options
author | McCabe Maxsted | 2009-03-07 18:55:47 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-03-07 18:55:47 -0700 |
commit | 457f0d9f42f1c6d80b95435a5d2650474b96926b (patch) | |
tree | 638d7cfb51e43d590f1f1db708bd5c05e185d445 /linden | |
parent | Backported fix for VWR-8783, original patch by Gigs Taggart (diff) | |
download | meta-impy-457f0d9f42f1c6d80b95435a5d2650474b96926b.zip meta-impy-457f0d9f42f1c6d80b95435a5d2650474b96926b.tar.gz meta-impy-457f0d9f42f1c6d80b95435a5d2650474b96926b.tar.bz2 meta-impy-457f0d9f42f1c6d80b95435a5d2650474b96926b.tar.xz |
Landmark icons now correctly change color when visited (patch by Zi Ree--VWR-7896)
Diffstat (limited to 'linden')
-rw-r--r-- | linden/indra/newview/llfloaterurldisplay.cpp | 3 | ||||
-rw-r--r-- | linden/indra/newview/llinventorybridge.cpp | 13 | ||||
-rw-r--r-- | linden/indra/newview/llpanelinventory.cpp | 6 | ||||
-rw-r--r-- | linden/indra/newview/llpanelplace.cpp | 6 | ||||
-rw-r--r-- | linden/indra/newview/llpanelplace.h | 2 | ||||
-rw-r--r-- | linden/indra/newview/llpreviewlandmark.cpp | 2 | ||||
-rw-r--r-- | linden/indra/newview/llviewermessage.cpp | 6 |
7 files changed, 25 insertions, 13 deletions
diff --git a/linden/indra/newview/llfloaterurldisplay.cpp b/linden/indra/newview/llfloaterurldisplay.cpp index 563eaf6..457d8b6 100644 --- a/linden/indra/newview/llfloaterurldisplay.cpp +++ b/linden/indra/newview/llfloaterurldisplay.cpp | |||
@@ -75,7 +75,8 @@ void LLFloaterURLDisplay::displayParcelInfo(U64 region_handle, const LLVector3& | |||
75 | 75 | ||
76 | LLUUID region_id; // don't know this | 76 | LLUUID region_id; // don't know this |
77 | LLUUID landmark_asset_id; // don't know this either | 77 | LLUUID landmark_asset_id; // don't know this either |
78 | mPlacePanel->displayParcelInfo(pos_local, landmark_asset_id, region_id, pos_global); | 78 | LLUUID landmark_item_id; // don't know this either |
79 | mPlacePanel->displayParcelInfo(pos_local, landmark_asset_id, landmark_item_id, region_id, pos_global); | ||
79 | 80 | ||
80 | this->setVisible(true); | 81 | this->setVisible(true); |
81 | this->setFrontmost(true); | 82 | this->setFrontmost(true); |
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index 34277f7..9506786 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp | |||
@@ -2606,7 +2606,7 @@ void LLLandmarkBridge::performAction(LLFolderView* folder, LLInventoryModel* mod | |||
2606 | // because you'll probably arrive at a telehub instead | 2606 | // because you'll probably arrive at a telehub instead |
2607 | if( gFloaterWorldMap ) | 2607 | if( gFloaterWorldMap ) |
2608 | { | 2608 | { |
2609 | gFloaterWorldMap->trackLandmark( item->getAssetUUID() ); | 2609 | gFloaterWorldMap->trackLandmark(item->getUUID()); // remember this must be the item UUID, not the asset UUID |
2610 | } | 2610 | } |
2611 | } | 2611 | } |
2612 | } | 2612 | } |
@@ -2651,20 +2651,19 @@ void open_landmark(LLViewerInventoryItem* inv_item, | |||
2651 | 2651 | ||
2652 | static void open_landmark_callback(S32 option, void* data) | 2652 | static void open_landmark_callback(S32 option, void* data) |
2653 | { | 2653 | { |
2654 | LLUUID* asset_idp = (LLUUID*)data; | 2654 | LLInventoryItem* itemp = (LLInventoryItem*)data; |
2655 | if (option == 0) | 2655 | if (option == 0) |
2656 | { | 2656 | { |
2657 | // HACK: This is to demonstrate teleport on double click for landmarks | 2657 | // HACK: This is to demonstrate teleport on double click for landmarks |
2658 | gAgent.teleportViaLandmark( *asset_idp ); | 2658 | gAgent.teleportViaLandmark( itemp->getAssetUUID() ); |
2659 | 2659 | ||
2660 | // we now automatically track the landmark you're teleporting to | 2660 | // we now automatically track the landmark you're teleporting to |
2661 | // because you'll probably arrive at a telehub instead | 2661 | // because you'll probably arrive at a telehub instead |
2662 | if( gFloaterWorldMap ) | 2662 | if( gFloaterWorldMap ) |
2663 | { | 2663 | { |
2664 | gFloaterWorldMap->trackLandmark( *asset_idp ); | 2664 | gFloaterWorldMap->trackLandmark( itemp->getUUID() ); // remember this is the item UUID not the asset UUID |
2665 | } | 2665 | } |
2666 | } | 2666 | } |
2667 | delete asset_idp; | ||
2668 | } | 2667 | } |
2669 | 2668 | ||
2670 | void LLLandmarkBridge::openItem() | 2669 | void LLLandmarkBridge::openItem() |
@@ -2675,9 +2674,9 @@ void LLLandmarkBridge::openItem() | |||
2675 | // Opening (double-clicking) a landmark immediately teleports, | 2674 | // Opening (double-clicking) a landmark immediately teleports, |
2676 | // but warns you the first time. | 2675 | // but warns you the first time. |
2677 | // open_landmark(item, std::string(" ") + getPrefix() + item->getName(), FALSE); | 2676 | // open_landmark(item, std::string(" ") + getPrefix() + item->getName(), FALSE); |
2678 | LLUUID* asset_idp = new LLUUID(item->getAssetUUID()); | ||
2679 | LLAlertDialog::showXml("TeleportFromLandmark", | 2677 | LLAlertDialog::showXml("TeleportFromLandmark", |
2680 | open_landmark_callback, (void*)asset_idp); | 2678 | // send the full inventory item so the callback can use both asset UUID and inventory item id |
2679 | open_landmark_callback, (void*)item); | ||
2681 | } | 2680 | } |
2682 | } | 2681 | } |
2683 | 2682 | ||
diff --git a/linden/indra/newview/llpanelinventory.cpp b/linden/indra/newview/llpanelinventory.cpp index 7277f05..631733a 100644 --- a/linden/indra/newview/llpanelinventory.cpp +++ b/linden/indra/newview/llpanelinventory.cpp | |||
@@ -1080,7 +1080,11 @@ LLTaskLandmarkBridge::LLTaskLandmarkBridge( | |||
1080 | 1080 | ||
1081 | LLUIImagePtr LLTaskLandmarkBridge::getIcon() const | 1081 | LLUIImagePtr LLTaskLandmarkBridge::getIcon() const |
1082 | { | 1082 | { |
1083 | return get_item_icon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, 0, FALSE); | 1083 | LLInventoryItem* item = findItem(); |
1084 | BOOL visited = FALSE; | ||
1085 | if(item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED) visited=TRUE; | ||
1086 | // attachment point parameter in get_item_icon is used for visited/unvisited landmark | ||
1087 | return get_item_icon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, visited, FALSE); | ||
1084 | } | 1088 | } |
1085 | 1089 | ||
1086 | 1090 | ||
diff --git a/linden/indra/newview/llpanelplace.cpp b/linden/indra/newview/llpanelplace.cpp index d8813b3..42134f3 100644 --- a/linden/indra/newview/llpanelplace.cpp +++ b/linden/indra/newview/llpanelplace.cpp | |||
@@ -333,6 +333,7 @@ void LLPanelPlace::processParcelInfoReply(LLMessageSystem *msg, void **) | |||
333 | 333 | ||
334 | void LLPanelPlace::displayParcelInfo(const LLVector3& pos_region, | 334 | void LLPanelPlace::displayParcelInfo(const LLVector3& pos_region, |
335 | const LLUUID& landmark_asset_id, | 335 | const LLUUID& landmark_asset_id, |
336 | const LLUUID& landmark_item_id, // item_id to be able to send map correct id | ||
336 | const LLUUID& region_id, | 337 | const LLUUID& region_id, |
337 | const LLVector3d& pos_global) | 338 | const LLVector3d& pos_global) |
338 | { | 339 | { |
@@ -340,6 +341,7 @@ void LLPanelPlace::displayParcelInfo(const LLVector3& pos_region, | |||
340 | mPosRegion = pos_region; | 341 | mPosRegion = pos_region; |
341 | mPosGlobal = pos_global; | 342 | mPosGlobal = pos_global; |
342 | mLandmarkAssetID = landmark_asset_id; | 343 | mLandmarkAssetID = landmark_asset_id; |
344 | mLandmarkItemID = landmark_item_id; | ||
343 | std::string url = gAgent.getRegion()->getCapability("RemoteParcelRequest"); | 345 | std::string url = gAgent.getRegion()->getCapability("RemoteParcelRequest"); |
344 | if (!url.empty()) | 346 | if (!url.empty()) |
345 | { | 347 | { |
@@ -379,8 +381,8 @@ void LLPanelPlace::onClickTeleport(void* data) | |||
379 | if(self->mLandmarkAssetID.notNull()) | 381 | if(self->mLandmarkAssetID.notNull()) |
380 | { | 382 | { |
381 | gAgent.teleportViaLandmark(self->mLandmarkAssetID); | 383 | gAgent.teleportViaLandmark(self->mLandmarkAssetID); |
382 | gFloaterWorldMap->trackLandmark(self->mLandmarkAssetID); | 384 | // remember this must be an inventory item id, not an asset UUID |
383 | 385 | gFloaterWorldMap->trackLandmark(self->mLandmarkItemID); | |
384 | } | 386 | } |
385 | else if (!self->mPosGlobal.isExactlyZero()) | 387 | else if (!self->mPosGlobal.isExactlyZero()) |
386 | { | 388 | { |
diff --git a/linden/indra/newview/llpanelplace.h b/linden/indra/newview/llpanelplace.h index df53013..0478d93 100644 --- a/linden/indra/newview/llpanelplace.h +++ b/linden/indra/newview/llpanelplace.h | |||
@@ -70,6 +70,7 @@ public: | |||
70 | void sendParcelInfoRequest(); | 70 | void sendParcelInfoRequest(); |
71 | void displayParcelInfo(const LLVector3& pos_region, | 71 | void displayParcelInfo(const LLVector3& pos_region, |
72 | const LLUUID& landmark_asset_id, | 72 | const LLUUID& landmark_asset_id, |
73 | const LLUUID& landmark_item_id, // so we can send map floater the correct inventory item id | ||
73 | const LLUUID& region_id, | 74 | const LLUUID& region_id, |
74 | const LLVector3d& pos_global); | 75 | const LLVector3d& pos_global); |
75 | static void processParcelInfoReply(LLMessageSystem* msg, void**); | 76 | static void processParcelInfoReply(LLMessageSystem* msg, void**); |
@@ -90,6 +91,7 @@ protected: | |||
90 | LLUUID mRequestedID; | 91 | LLUUID mRequestedID; |
91 | LLUUID mRegionID; | 92 | LLUUID mRegionID; |
92 | LLUUID mLandmarkAssetID; | 93 | LLUUID mLandmarkAssetID; |
94 | LLUUID mLandmarkItemID; | ||
93 | // Absolute position of the location for teleport, may not | 95 | // Absolute position of the location for teleport, may not |
94 | // be available (hence zero) | 96 | // be available (hence zero) |
95 | LLVector3d mPosGlobal; | 97 | LLVector3d mPosGlobal; |
diff --git a/linden/indra/newview/llpreviewlandmark.cpp b/linden/indra/newview/llpreviewlandmark.cpp index 20b0ee5..3a92f5a 100644 --- a/linden/indra/newview/llpreviewlandmark.cpp +++ b/linden/indra/newview/llpreviewlandmark.cpp | |||
@@ -189,7 +189,7 @@ void LLPreviewLandmark::draw() | |||
189 | LLUUID region_id; | 189 | LLUUID region_id; |
190 | mLandmark->getRegionID(region_id); // might find null? | 190 | mLandmark->getRegionID(region_id); // might find null? |
191 | LLVector3d pos_global = getPositionGlobal(); // might be 0 | 191 | LLVector3d pos_global = getPositionGlobal(); // might be 0 |
192 | mPlacePanel->displayParcelInfo(pos_region, landmark_asset_id, region_id, pos_global); | 192 | mPlacePanel->displayParcelInfo(pos_region, landmark_asset_id, getItem()->getUUID(), region_id, pos_global); |
193 | } | 193 | } |
194 | } | 194 | } |
195 | 195 | ||
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 221de59..86eca8f 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp | |||
@@ -2768,7 +2768,11 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) | |||
2768 | LLVector3 beacon_dir(agent_pos.mV[VX] - (F32)fmod(beacon_pos.mdV[VX], 256.0), agent_pos.mV[VY] - (F32)fmod(beacon_pos.mdV[VY], 256.0), 0); | 2768 | LLVector3 beacon_dir(agent_pos.mV[VX] - (F32)fmod(beacon_pos.mdV[VX], 256.0), agent_pos.mV[VY] - (F32)fmod(beacon_pos.mdV[VY], 256.0), 0); |
2769 | if (beacon_dir.magVecSquared() < 25.f) | 2769 | if (beacon_dir.magVecSquared() < 25.f) |
2770 | { | 2770 | { |
2771 | LLTracker::stopTracking(NULL); | 2771 | // do not stop tracking landmarks here, so they can properly be marked as visited in LLTracker() |
2772 | if(LLTracker::getTrackingStatus()!=LLTracker::TRACKING_LANDMARK) | ||
2773 | { | ||
2774 | LLTracker::stopTracking(NULL); | ||
2775 | } | ||
2772 | } | 2776 | } |
2773 | else if ( is_teleport ) | 2777 | else if ( is_teleport ) |
2774 | { | 2778 | { |