MAINT-2497 FIX (Viewer) - viewer side change that goes with server side fix - adds direction when you set a TP landing point

meow-7.2.2
callum_linden 2013-03-18 17:00:29 -07:00
parent 54d8249691
commit 79edd066a4
2 changed files with 8 additions and 3 deletions

View File

@ -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 );

View File

@ -4065,7 +4065,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
{
LLTracker::stopTracking(NULL);
}
else if ( is_teleport && !gAgent.getTeleportKeepsLookAt() )
else if ( is_teleport && !gAgent.getTeleportKeepsLookAt() && look_at.isExactlyZero())
{
//look at the beacon
LLVector3 global_agent_pos = agent_pos;