diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 7b678f16a6..a14407ddb5 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -2458,6 +2458,15 @@ BOOL LLPanelPreference::postBuild()
}
//
+ // Exodus' mouselook combat feature
+ if (hasChild("FSMouselookCombatFeatures", TRUE))
+ {
+ gSavedSettings.getControl("EnableMouselook")->getSignal()->connect(boost::bind(&LLPanelPreference::updateMouselookCombatFeatures, this));
+ gSavedSettings.getControl("FSMouselookCombatFeatures")->getSignal()->connect(boost::bind(&LLPanelPreference::updateMouselookCombatFeatures, this));
+ updateMouselookCombatFeatures();
+ }
+ //
+
////////////////////// PanelVoice ///////////////////
if (hasChild("voice_unavailable", TRUE))
{
@@ -2670,6 +2679,15 @@ void LLPanelPreference::onChatWindowChanged()
}
//
+// Exodus' mouselook combat feature
+void LLPanelPreference::updateMouselookCombatFeatures()
+{
+ bool enabled = gSavedSettings.getBOOL("EnableMouselook") && gSavedSettings.getBOOL("FSMouselookCombatFeatures");
+ getChild("ExodusMouselookIFF")->setEnabled(enabled);
+ getChild("ExodusMouselookIFFRange")->setEnabled(enabled);
+}
+//
+
void LLPanelPreference::cancel()
{
for (control_values_map_t::iterator iter = mSavedValues.begin();
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 4fc15ef2b8..56e5bae222 100755
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -279,6 +279,8 @@ private:
void onEnableGrowlChanged();
// Flash chat toolbar button notification
void onChatWindowChanged();
+ // Exodus' mouselook combat feature
+ void updateMouselookCombatFeatures();
typedef std::map string_color_map_t;
string_color_map_t mSavedColors;
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 15ecc13d55..d04e6ef6cb 100755
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -1710,6 +1710,18 @@ void LLNetMap::handleClearMarks()
{
sAvatarMarksMap.clear();
}
+
+bool LLNetMap::getAvatarMarkColor(const LLUUID& avatar_id, LLColor4& color)
+{
+ avatar_marks_map_t::iterator found = sAvatarMarksMap.find(avatar_id);
+ if (found != sAvatarMarksMap.end())
+ {
+ color = found->second;
+ return true;
+ }
+ return false;
+}
+
//
void LLNetMap::handleCam()
diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h
index 0dea01eebf..bd9550638c 100755
--- a/indra/newview/llnetmap.h
+++ b/indra/newview/llnetmap.h
@@ -100,6 +100,9 @@ public:
// Synchronize double click handling throughout instances
void performDoubleClickAction(LLVector3d pos_global);
+ // Mark avatar feature
+ static bool getAvatarMarkColor(const LLUUID& avatar_id, LLColor4& color);
+
private:
const LLVector3d& getObjectImageCenterGlobal() { return mObjectImageCenterGlobal; }
void renderPoint(const LLVector3 &pos, const LLColor4U &color,
diff --git a/indra/newview/lltracker.h b/indra/newview/lltracker.h
index af2431e97a..6bc0329302 100755
--- a/indra/newview/lltracker.h
+++ b/indra/newview/lltracker.h
@@ -105,6 +105,10 @@ public:
static const std::string& getLabel() { return instance()->mLabel; }
static const std::string& getToolTip() { return instance()->mToolTip; }
+
+ // Exodus' mouselook combat feature
+ void drawMarker(const LLVector3d& pos_global, const LLColor4& color);
+
protected:
LLTracker();
~LLTracker();
@@ -119,7 +123,7 @@ protected:
void stopTrackingLocation(BOOL clear_ui = FALSE);
void stopTrackingLandmark(BOOL clear_ui = FALSE);
- void drawMarker(const LLVector3d& pos_global, const LLColor4& color);
+ //void drawMarker(const LLVector3d& pos_global, const LLColor4& color); Exodus' mouselook combat feature
void setLandmarkVisited();
void cacheLandmarkPosition();
void purgeBeaconText();
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 941d2967eb..01f851d4cb 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -228,6 +228,8 @@
#include "utilitybar.h" // Support for the classic V1 style buttons in some skins
#include "exopostprocess.h" // Exodus Vignette
+#include "llnetmap.h"
+#include "lggcontactsets.h"
//
// Globals
@@ -2686,6 +2688,104 @@ void LLViewerWindow::draw()
// Draw tool specific overlay on world
LLToolMgr::getInstance()->getCurrentTool()->draw();
+
+ // Draw HUD stuff.
+ bool inMouselook = gAgentCamera.cameraMouselook();
+ static LLCachedControl fsMouselookCombatFeatures(gSavedSettings, "FSMouselookCombatFeatures", true);
+ if (inMouselook && fsMouselookCombatFeatures)
+ {
+ S32 windowWidth = gViewerWindow->getWorldViewRectScaled().getWidth();
+ S32 windowHeight = gViewerWindow->getWorldViewRectScaled().getHeight();
+
+ static const std::string unknown_agent = LLTrans::getString("Mouselook_Unknown_Avatar");
+ static LLUIColor map_avatar_color = LLUIColorTable::instance().getColor("MapAvatarColor", LLColor4::white);
+ static LLCachedControl renderIFFRange(gSavedSettings, "ExodusMouselookIFFRange", 380.f);
+ static LLCachedControl renderIFF(gSavedSettings, "ExodusMouselookIFF", true);
+ static LLUICachedControl userPresetX("ExodusMouselookTextOffsetX", 0.f);
+ static LLUICachedControl userPresetY("ExodusMouselookTextOffsetY", -150.f);
+ static LLUICachedControl userPresetHAlign("ExodusMouselookTextHAlign", 2);
+
+ LLVector3d myPosition = gAgentCamera.getCameraPositionGlobal();
+ LLQuaternion myRotation = LLViewerCamera::getInstance()->getQuaternion();
+
+ myRotation.set(-myRotation.mQ[VX], -myRotation.mQ[VY], -myRotation.mQ[VZ], myRotation.mQ[VW]);
+
+ uuid_vec_t avatars;
+ std::vector positions;
+ LLWorld::getInstance()->getAvatars(&avatars, &positions, gAgent.getPositionGlobal(), renderIFFRange);
+
+ bool crosshairRendered = false;
+
+ S32 length = avatars.size();
+ if (length)
+ {
+ for (S32 i = 0; i < length; i++)
+ {
+ LLUUID& targetKey = avatars[i];
+ if (targetKey == gAgentID)
+ {
+ continue;
+ }
+
+ LLVector3d targetPosition = positions[i];
+ if (targetPosition.isNull())
+ {
+ continue;
+ }
+
+ LLColor4 targetColor = map_avatar_color.get();
+ targetColor = LGGContactSets::getInstance()->colorize(targetKey, targetColor, LGG_CS_MINIMAP);
+
+ //color based on contact sets prefs
+ if (LGGContactSets::getInstance()->hasFriendColorThatShouldShow(targetKey, LGG_CS_MINIMAP))
+ {
+ targetColor = LGGContactSets::getInstance()->getFriendColor(targetKey);
+ }
+
+ LLColor4 mark_color;
+ if (LLNetMap::getAvatarMarkColor(targetKey, mark_color))
+ {
+ targetColor = mark_color;
+ }
+
+ if (renderIFF)
+ {
+ LLTracker::instance()->drawMarker(targetPosition, targetColor);
+ }
+
+ if (inMouselook && !crosshairRendered)
+ {
+ LLVector3d magicVector = (targetPosition - myPosition) * myRotation;
+ magicVector.setVec(-magicVector.mdV[VY], magicVector.mdV[VZ], magicVector.mdV[VX]);
+
+ if (magicVector.mdV[VX] > -0.75 && magicVector.mdV[VX] < 0.75 && magicVector.mdV[VZ] > 0.0 && magicVector.mdV[VY] > -1.5 && magicVector.mdV[VY] < 1.5) // Do not fuck with these, cheater. :(
+ {
+ LLAvatarName avatarName;
+ std::string targetName = unknown_agent;
+ if (LLAvatarNameCache::get(targetKey, &avatarName))
+ {
+ targetName = avatarName.getCompleteName();
+ }
+
+ LLFontGL::getFontSansSerifBold()->renderUTF8(
+ llformat("%s, %.2fm", targetName.c_str(), (targetPosition - myPosition).magVec()),
+ 0, (windowWidth / 2.f) + userPresetX, (windowHeight / 2.f) + userPresetY, targetColor,
+ (LLFontGL::HAlign)((S32)userPresetHAlign), LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT
+ );
+
+ crosshairRendered = true;
+ }
+ }
+
+ if (!renderIFF && inMouselook && crosshairRendered)
+ {
+ break;
+ }
+ }
+ }
+ }
+ //
+
// Only show Mouselookinstructions if FSShowMouselookInstruction is TRUE
static LLCachedControl fsShowMouselookInstructions(gSavedSettings, "FSShowMouselookInstructions");
if( fsShowMouselookInstructions && (gAgentCamera.cameraMouselook() || LLFloaterCamera::inFreeCameraMode()) )
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_move.xml b/indra/newview/skins/default/xui/de/panel_preferences_move.xml
index 0adb9497ed..4e26c14678 100755
--- a/indra/newview/skins/default/xui/de/panel_preferences_move.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_move.xml
@@ -22,6 +22,9 @@
+
+
+
Mausempfindlichkeit für Mouselook:
diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml
index 9e0e8a5336..faedf0c779 100755
--- a/indra/newview/skins/default/xui/de/strings.xml
+++ b/indra/newview/skins/default/xui/de/strings.xml
@@ -5848,4 +5848,8 @@ Setzen Sie den Editorpfad in Anführungszeichen
Neu
+
+
+ Unbekannter Avatar
+
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_move.xml b/indra/newview/skins/default/xui/en/panel_preferences_move.xml
index 5743e54ae3..01e7e45269 100755
--- a/indra/newview/skins/default/xui/en/panel_preferences_move.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_move.xml
@@ -129,7 +129,7 @@
label="Don't use the mouse wheel to control zoom level of the camera"
layout="topleft"
name="FSDisableMouseWheelCameraZoom"
- top_pad="5"
+ top_pad="2"
width="315"/>
+
+
+
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index ae1f0f408a..f044c5a5bd 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2623,4 +2623,6 @@ Try enclosing path to the editor with double quotes.
is offline.
New
+
+ Unknown agent