From 08c1dff86ce454eb0f53eba9dedceb1bca0e143c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 22 Aug 2016 20:43:11 +0100 Subject: [PATCH] change strange rotation in legacy MapImageModule (untested) --- .../Region/CoreModules/World/LegacyMap/MapImageModule.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs index 515580417e..1f2b7c4b49 100644 --- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs @@ -382,7 +382,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap Vector3 pos = part.GetWorldPosition(); - // skip prim outside of retion + // skip prim outside of region if (!m_scene.PositionIsInCurrentRegion(pos)) continue; @@ -406,12 +406,13 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap { // Translate scale by rotation so scale is represented properly when object is rotated Vector3 lscale = new Vector3(part.Shape.Scale.X, part.Shape.Scale.Y, part.Shape.Scale.Z); + lscale *= 0.5f; + Vector3 scale = new Vector3(); Vector3 tScale = new Vector3(); Vector3 axPos = new Vector3(pos.X, pos.Y, pos.Z); - Quaternion llrot = part.GetWorldRotation(); - Quaternion rot = new Quaternion(llrot.W, llrot.X, llrot.Y, llrot.Z); + Quaternion rot = part.GetWorldRotation(); scale = lscale * rot; // negative scales don't work in this situation @@ -470,7 +471,6 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap tScale = new Vector3(lscale.X, -lscale.Y, -lscale.Z); scale = ((tScale * rot)); - vertexes[2] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z))); //vertexes[2].x = pos.X + vertexes[2].x;