diff options
author | Melanie Thielker | 2016-05-23 19:18:24 +0200 |
---|---|---|
committer | Melanie Thielker | 2016-05-23 19:18:24 +0200 |
commit | 775a657bb10264db49f2e3f86144cf98ead56930 (patch) | |
tree | a708ce4539759f82abeab2190534fa8fd8896cd0 | |
parent | According to the SL wiki, estate managers can set parcels for sale. Make it sew. (diff) | |
download | opensim-SC-775a657bb10264db49f2e3f86144cf98ead56930.zip opensim-SC-775a657bb10264db49f2e3f86144cf98ead56930.tar.gz opensim-SC-775a657bb10264db49f2e3f86144cf98ead56930.tar.bz2 opensim-SC-775a657bb10264db49f2e3f86144cf98ead56930.tar.xz |
Addressing #7903. Fix legacy sit offsets to use legacy computation.
New offsets of course still use the correct math.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index e4c9de1..04df4ce 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3312,7 +3312,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3312 | Vector3 sitOffset; | 3312 | Vector3 sitOffset; |
3313 | Quaternion r = sitTargetOrient; | 3313 | Quaternion r = sitTargetOrient; |
3314 | 3314 | ||
3315 | if(LegacySitOffsets) | 3315 | Vector3 newPos; |
3316 | |||
3317 | if (LegacySitOffsets) | ||
3316 | { | 3318 | { |
3317 | double m1,m2; | 3319 | double m1,m2; |
3318 | 3320 | ||
@@ -3343,6 +3345,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3343 | 3345 | ||
3344 | Vector3 up = new Vector3((float)x, (float)y, (float)z); | 3346 | Vector3 up = new Vector3((float)x, (float)y, (float)z); |
3345 | sitOffset = up * (float)offset; | 3347 | sitOffset = up * (float)offset; |
3348 | newPos = sitTargetPos - sitOffset + SIT_TARGET_ADJUSTMENT; | ||
3346 | } | 3349 | } |
3347 | else | 3350 | else |
3348 | { | 3351 | { |
@@ -3373,9 +3376,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3373 | z = -r.X * r.X - r.Y * r.Y + r.Z * r.Z + r.W * r.W; | 3376 | z = -r.X * r.X - r.Y * r.Y + r.Z * r.Z + r.W * r.W; |
3374 | Vector3 up = new Vector3((float)x, (float)y, (float)z); | 3377 | Vector3 up = new Vector3((float)x, (float)y, (float)z); |
3375 | sitOffset = up * Appearance.AvatarHeight * 0.02638f; | 3378 | sitOffset = up * Appearance.AvatarHeight * 0.02638f; |
3376 | } | 3379 | newPos = sitTargetPos + sitOffset + SIT_TARGET_ADJUSTMENT; |
3377 | 3380 | ||
3378 | Vector3 newPos = sitTargetPos + sitOffset + SIT_TARGET_ADJUSTMENT; | ||
3379 | Quaternion newRot; | 3381 | Quaternion newRot; |
3380 | 3382 | ||
3381 | if (part.IsRoot) | 3383 | if (part.IsRoot) |