From 79edd066a4ddce341b556642bf6b98ef761d59f6 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Mon, 18 Mar 2013 17:00:29 -0700 Subject: MAINT-2497 FIX (Viewer) - viewer side change that goes with server side fix - adds direction when you set a TP landing point --- indra/newview/llfloaterland.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloaterland.cpp') diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 5f58577a7c..22dd688be1 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2025,6 +2025,10 @@ void LLPanelLandOptions::refresh() mSnapshotCtrl->setImageAssetID(parcel->getSnapshotID()); mSnapshotCtrl->setEnabled( can_change_identity ); + // find out where we're looking and convert that to an angle in degrees on a regular compass (not the internal representation) + LLVector3 user_look_at = parcel->getUserLookAt(); + U32 user_look_at_angle = ( (U32)( ( atan2(user_look_at[1], -user_look_at[0]) + F_PI * 2 ) * RAD_TO_DEG + 0.5) - 90) % 360; + LLVector3 pos = parcel->getUserLocation(); if (pos.isExactlyZero()) { @@ -2032,10 +2036,11 @@ void LLPanelLandOptions::refresh() } else { - mLocationText->setTextArg("[LANDING]",llformat("%d, %d, %d", + mLocationText->setTextArg("[LANDING]",llformat("%d, %d, %d (%d\xC2\xB0)", llround(pos.mV[VX]), llround(pos.mV[VY]), - llround(pos.mV[VZ]))); + llround(pos.mV[VZ]), + user_look_at_angle)); } mSetBtn->setEnabled( can_change_landing_point ); -- cgit v1.2.3