aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs
diff options
context:
space:
mode:
authorMelanie2012-03-02 22:19:28 +0100
committerMelanie2012-03-02 22:19:28 +0100
commit458f295fdbc16a9861e1f6ee19fbfb54230a138b (patch)
tree9b9360c5bc0925e99fadbd897fd1a60b8334127e /OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs
parentFix and hook up llTeleportAgent (diff)
downloadopensim-SC-458f295fdbc16a9861e1f6ee19fbfb54230a138b.zip
opensim-SC-458f295fdbc16a9861e1f6ee19fbfb54230a138b.tar.gz
opensim-SC-458f295fdbc16a9861e1f6ee19fbfb54230a138b.tar.bz2
opensim-SC-458f295fdbc16a9861e1f6ee19fbfb54230a138b.tar.xz
This still causes terrain artefacts
Revert " fix the last fix. Regions are square but... Also remove the 0.5 offset in map position. It was apparently needed to fix we having nsamples = size and not size + 1." This reverts commit 15bc539bd49e7a09c1ec6e539871cde5eee6032e.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs4
1 files changed, 1 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs
index a57ebe9..ccdd32e 100644
--- a/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs
@@ -3495,7 +3495,7 @@ namespace OpenSim.Region.Physics.OdePlugin
3495 // Output x = 0 1 2 3 ..... 255 256 257 258 total out 3495 // Output x = 0 1 2 3 ..... 255 256 257 258 total out
3496 float val= heightMap[(yy * regionsize) + xx]; // input from heightMap, <0-255 * 256> <0-255> 3496 float val= heightMap[(yy * regionsize) + xx]; // input from heightMap, <0-255 * 256> <0-255>
3497 if (val < minele) val = minele; 3497 if (val < minele) val = minele;
3498 _heightmap[x * (heightmapHeightSamples) + y] = val; // samples output to _heightmap, <0-257 * 258> <0-257> 3498 _heightmap[x * (heightmapWidthSamples) + y] = val; // samples output to _heightmap, <0-257 * 258> <0-257>
3499 hfmin = (val < hfmin) ? val : hfmin; 3499 hfmin = (val < hfmin) ? val : hfmin;
3500 hfmax = (val > hfmax) ? val : hfmax; 3500 hfmax = (val > hfmax) ? val : hfmax;
3501 } 3501 }
@@ -3545,8 +3545,6 @@ namespace OpenSim.Region.Physics.OdePlugin
3545 d.RFromAxisAndAngle(out R, v3.X, v3.Y, v3.Z, angle); 3545 d.RFromAxisAndAngle(out R, v3.X, v3.Y, v3.Z, angle);
3546 d.GeomSetRotation(GroundGeom, ref R); 3546 d.GeomSetRotation(GroundGeom, ref R);
3547 d.GeomSetPosition(GroundGeom, (pOffset.X + (regionsize * 0.5f)) - 0.5f, (pOffset.Y + (regionsize * 0.5f)) - 0.5f, 0); 3547 d.GeomSetPosition(GroundGeom, (pOffset.X + (regionsize * 0.5f)) - 0.5f, (pOffset.Y + (regionsize * 0.5f)) - 0.5f, 0);
3548 // having nsamples = size + 1 center is actually at size/2
3549 d.GeomSetPosition(GroundGeom, (pOffset.X + (regionsize * 0.5f)), (pOffset.Y + (regionsize * 0.5f)), 0);
3550 IntPtr testGround = IntPtr.Zero; 3548 IntPtr testGround = IntPtr.Zero;
3551 if (RegionTerrain.TryGetValue(pOffset, out testGround)) 3549 if (RegionTerrain.TryGetValue(pOffset, out testGround))
3552 { 3550 {