diff -Nur opensim-/OpenSim/Region/Framework/Scenes/Scene.cs opensim/OpenSim/Region/Framework/Scenes/Scene.cs --- opensim-/OpenSim/Region/Framework/Scenes/Scene.cs 2009-08-13 23:03:12.000000000 +0900 +++ opensim/OpenSim/Region/Framework/Scenes/Scene.cs 2009-08-13 17:42:52.000000000 +0900 @@ -383,10 +383,10 @@ StatsReporter.SetObjectCapacity(objectCapacity); - m_simulatorVersion = simulatorVersion - + " (OS " + Util.GetOperatingSystemInformation() + ")" - + " ChilTasks:" + m_seeIntoRegionFromNeighbor.ToString() - + " PhysPrim:" + m_physicalPrim.ToString(); + m_simulatorVersion = simulatorVersion; + // + " (OS " + Util.GetOperatingSystemInformation() + ")" + // + " ChilTasks:" + m_seeIntoRegionFromNeighbor.ToString() + // + " PhysPrim:" + m_physicalPrim.ToString(); try { diff -Nur opensim-/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs opensim/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs --- opensim-/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs 2009-08-13 23:03:12.000000000 +0900 +++ opensim/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs 2009-08-13 17:42:52.000000000 +0900 @@ -304,10 +304,12 @@ public d.Vector3 xyz = new d.Vector3(128.1640f, 128.3079f, 25.7600f); public d.Vector3 hpr = new d.Vector3(125.5000f, -17.0000f, 0.0000f); - // TODO: unused: private uint heightmapWidth = m_regionWidth + 1; - // TODO: unused: private uint heightmapHeight = m_regionHeight + 1; - // TODO: unused: private uint heightmapWidthSamples; - // TODO: unused: private uint heightmapHeightSamples; + private uint heightmapWidth = m_regionWidth + 1; + private uint heightmapHeight = m_regionHeight + 1; + + private uint heightmapWidthSamples; + + private uint heightmapHeightSamples; private volatile int m_global_contactcount = 0; @@ -2928,8 +2930,40 @@ { foreach (OdeCharacter actor in _characters) { - if (actor != null) + if (actor != null) { actor.UpdatePositionAndVelocity(); + + // by Fumi.Iseki for falling at SIM boundary + d.Vector3 vec = d.BodyGetPosition(actor.Body); + + //if (vec.Y<=0.0f || vec.Y>=255.95f || vec.X<=0.0f || vec.X>=255.95f) { + if ((vec.Y<=0.0f || vec.Y>=255.95f || vec.X<=0.0f || vec.X>=255.95f) && !actor.IsColliding && !actor.CollidingGround) { + if (vec.Y<=0.0f) vec.Y = 0.1f; + else if (vec.Y>255.95f) vec.Y = 255.95f; + if (vec.X<=0.0f) vec.X = 0.1f; + else if (vec.X>255.95f) vec.X = 255.95f; + + float height = _origheightmap[(int)vec.Y * Constants.RegionSize + (int)vec.X]; + if (actor.Flying) { + if (vec.Z < height + 2) { + vec.Z = height + actor.Size.Z/2; + actor.Velocity.Z = 0; + actor.IsColliding = true; + } + } + else { + if (vec.Z < height + actor.Size.Z/2) { + vec.Z = height + actor.Size.Z/2; + actor.Velocity.Z = 0; + actor.IsColliding = true; + actor.CollidingGround = true; + } + } + + actor.Position = new PhysicsVector(vec.X, vec.Y, vec.Z); + d.BodySetPosition(actor.Body, vec.X, vec.Y, vec.Z); + } + } } } diff -Nur opensim-/bin/OpenMetaverse.dll.config opensim/bin/OpenMetaverse.dll.config --- opensim-/bin/OpenMetaverse.dll.config 2009-08-11 22:56:29.000000000 +0900 +++ opensim/bin/OpenMetaverse.dll.config 2009-08-11 22:56:49.000000000 +0900 @@ -1,7 +1,7 @@ - +