aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs23
1 files changed, 11 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
index 796a15f..b927cfa 100644
--- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
@@ -82,11 +82,11 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
82 82
83 string[] configSections = new string[] { "Map", "Startup" }; 83 string[] configSections = new string[] { "Map", "Startup" };
84 84
85 drawPrimVolume 85 drawPrimVolume
86 = Util.GetConfigVarFromSections<bool>(m_config, "DrawPrimOnMapTile", configSections, drawPrimVolume); 86 = Util.GetConfigVarFromSections<bool>(m_config, "DrawPrimOnMapTile", configSections, drawPrimVolume);
87 textureTerrain 87 textureTerrain
88 = Util.GetConfigVarFromSections<bool>(m_config, "TextureOnMapTile", configSections, textureTerrain); 88 = Util.GetConfigVarFromSections<bool>(m_config, "TextureOnMapTile", configSections, textureTerrain);
89 generateMaptiles 89 generateMaptiles
90 = Util.GetConfigVarFromSections<bool>(m_config, "GenerateMaptiles", configSections, generateMaptiles); 90 = Util.GetConfigVarFromSections<bool>(m_config, "GenerateMaptiles", configSections, generateMaptiles);
91 91
92 if (generateMaptiles) 92 if (generateMaptiles)
@@ -112,7 +112,6 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
112 //} 112 //}
113 //t = System.Environment.TickCount - t; 113 //t = System.Environment.TickCount - t;
114 //m_log.InfoFormat("[MAPTILE] generation of 10 maptiles needed {0} ms", t); 114 //m_log.InfoFormat("[MAPTILE] generation of 10 maptiles needed {0} ms", t);
115
116 if (drawPrimVolume) 115 if (drawPrimVolume)
117 { 116 {
118 DrawObjectVolume(m_scene, mapbmp); 117 DrawObjectVolume(m_scene, mapbmp);
@@ -127,15 +126,15 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
127 catch (Exception) 126 catch (Exception)
128 { 127 {
129 m_log.ErrorFormat( 128 m_log.ErrorFormat(
130 "[MAPTILE]: Failed to load Static map image texture file: {0} for {1}", 129 "[MAPTILE]: Failed to load Static map image texture file: {0} for {1}",
131 m_scene.RegionInfo.MaptileStaticFile, m_scene.Name); 130 m_scene.RegionInfo.MaptileStaticFile, m_scene.Name);
132 //mapbmp = new Bitmap((int)m_scene.Heightmap.Width, (int)m_scene.Heightmap.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb); 131 //mapbmp = new Bitmap((int)m_scene.Heightmap.Width, (int)m_scene.Heightmap.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
133 mapbmp = null; 132 mapbmp = null;
134 } 133 }
135 134
136 if (mapbmp != null) 135 if (mapbmp != null)
137 m_log.DebugFormat( 136 m_log.DebugFormat(
138 "[MAPTILE]: Static map image texture file {0} found for {1}", 137 "[MAPTILE]: Static map image texture file {0} found for {1}",
139 m_scene.RegionInfo.MaptileStaticFile, m_scene.Name); 138 m_scene.RegionInfo.MaptileStaticFile, m_scene.Name);
140 } 139 }
141 } 140 }
@@ -309,7 +308,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
309 List<uint> z_localIDs = new List<uint>(); 308 List<uint> z_localIDs = new List<uint>();
310 Dictionary<uint, DrawStruct> z_sort = new Dictionary<uint, DrawStruct>(); 309 Dictionary<uint, DrawStruct> z_sort = new Dictionary<uint, DrawStruct>();
311 310
312 try 311 try
313 { 312 {
314 lock (objs) 313 lock (objs)
315 { 314 {
@@ -383,7 +382,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
383 382
384 Vector3 pos = part.GetWorldPosition(); 383 Vector3 pos = part.GetWorldPosition();
385 384
386 // skip prim outside of retion 385 // skip prim outside of region
387 if (!m_scene.PositionIsInCurrentRegion(pos)) 386 if (!m_scene.PositionIsInCurrentRegion(pos))
388 continue; 387 continue;
389 388
@@ -407,12 +406,13 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
407 { 406 {
408 // Translate scale by rotation so scale is represented properly when object is rotated 407 // Translate scale by rotation so scale is represented properly when object is rotated
409 Vector3 lscale = new Vector3(part.Shape.Scale.X, part.Shape.Scale.Y, part.Shape.Scale.Z); 408 Vector3 lscale = new Vector3(part.Shape.Scale.X, part.Shape.Scale.Y, part.Shape.Scale.Z);
409 lscale *= 0.5f;
410
410 Vector3 scale = new Vector3(); 411 Vector3 scale = new Vector3();
411 Vector3 tScale = new Vector3(); 412 Vector3 tScale = new Vector3();
412 Vector3 axPos = new Vector3(pos.X, pos.Y, pos.Z); 413 Vector3 axPos = new Vector3(pos.X, pos.Y, pos.Z);
413 414
414 Quaternion llrot = part.GetWorldRotation(); 415 Quaternion rot = part.GetWorldRotation();
415 Quaternion rot = new Quaternion(llrot.W, llrot.X, llrot.Y, llrot.Z);
416 scale = lscale * rot; 416 scale = lscale * rot;
417 417
418 // negative scales don't work in this situation 418 // negative scales don't work in this situation
@@ -471,7 +471,6 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
471 471
472 tScale = new Vector3(lscale.X, -lscale.Y, -lscale.Z); 472 tScale = new Vector3(lscale.X, -lscale.Y, -lscale.Z);
473 scale = ((tScale * rot)); 473 scale = ((tScale * rot));
474
475 vertexes[2] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z))); 474 vertexes[2] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z)));
476 475
477 //vertexes[2].x = pos.X + vertexes[2].x; 476 //vertexes[2].x = pos.X + vertexes[2].x;