From d0f93cdb2088a1d30ff409855fca4040235dffc4 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 8 Feb 2014 12:36:06 +0100 Subject: [PATCH] Fix line endings --- indra/newview/llviewerwindow.cpp | 176 +++++++++++++++---------------- 1 file changed, 88 insertions(+), 88 deletions(-) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 01f851d4cb..eb1e0d87ee 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2689,51 +2689,51 @@ 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"); + // 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(); + 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 @@ -2741,50 +2741,50 @@ void LLViewerWindow::draw() { 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; - } - } - } - } - // + + 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");