diff options
author | callum_linden <none@none> | 2013-03-18 17:00:29 -0700 |
---|---|---|
committer | callum_linden <none@none> | 2013-03-18 17:00:29 -0700 |
commit | 79edd066a4ddce341b556642bf6b98ef761d59f6 (patch) | |
tree | 9130725a274b1cffc0d9f41a138b8a8c7c46023c /indra/newview/llfloaterland.cpp | |
parent | 54d8249691aea2b1bd3cd21d2569c977ff469e6f (diff) |
MAINT-2497 FIX (Viewer) - viewer side change that goes with server side fix - adds direction when you set a TP landing point
Diffstat (limited to 'indra/newview/llfloaterland.cpp')
-rw-r--r-- | indra/newview/llfloaterland.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
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 ); |