Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster

avinationmerge
Melanie 2009-12-25 23:20:08 +00:00
commit e881f35fbb
3 changed files with 28 additions and 2 deletions

View File

@ -29,7 +29,7 @@ namespace OpenSim
{ {
public class VersionInfo public class VersionInfo
{ {
private const string VERSION_NUMBER = "0.6.91CM"; private const string VERSION_NUMBER = "0.6.92Ch";
private const Flavour VERSION_FLAVOUR = Flavour.Dev; private const Flavour VERSION_FLAVOUR = Flavour.Dev;
public enum Flavour public enum Flavour
{ {

View File

@ -222,6 +222,30 @@ namespace OpenSim.Region.Framework.Scenes
protected internal bool AddRestoredSceneObject( protected internal bool AddRestoredSceneObject(
SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted)
{ {
// KF: Check for out-of-region, move inside and make static.
Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X,
sceneObject.RootPart.GroupPosition.Y,
sceneObject.RootPart.GroupPosition.Z);
if (npos.X < 0.0 || npos.Y < 0.0 || npos.Z < 0.0 ||
npos.X > Constants.RegionSize ||
npos.Y > Constants.RegionSize)
{
if (npos.X < 0.0) npos.X = 1.0f;
if (npos.Y < 0.0) npos.Y = 1.0f;
if (npos.Z < 0.0) npos.Z = 0.0f;
if (npos.X > Constants.RegionSize) npos.X = Constants.RegionSize - 1.0f;
if (npos.Y > Constants.RegionSize) npos.Y = Constants.RegionSize - 1.0f;
foreach (SceneObjectPart part in sceneObject.Children.Values)
{
part.GroupPosition = npos;
}
sceneObject.RootPart.Velocity = Vector3.Zero;
sceneObject.RootPart.AngularVelocity = Vector3.Zero;
sceneObject.RootPart.Acceleration = Vector3.Zero;
sceneObject.RootPart.Velocity = Vector3.Zero;
}
if (!alreadyPersisted) if (!alreadyPersisted)
{ {
sceneObject.ForceInventoryPersistence(); sceneObject.ForceInventoryPersistence();

View File

@ -215,6 +215,7 @@ namespace OpenSim.Region.Physics.OdePlugin
parent_scene.GetTerrainHeightAtXY(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f)) + 0.5f); parent_scene.GetTerrainHeightAtXY(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f)) + 0.5f);
m_log.Warn("[PHYSICS]: Got nonFinite Object create Position"); m_log.Warn("[PHYSICS]: Got nonFinite Object create Position");
} }
_position = pos; _position = pos;
m_taintposition = pos; m_taintposition = pos;
PID_D = parent_scene.bodyPIDD; PID_D = parent_scene.bodyPIDD;
@ -254,7 +255,8 @@ namespace OpenSim.Region.Physics.OdePlugin
_parent_scene = parent_scene; _parent_scene = parent_scene;
m_targetSpace = (IntPtr)0; m_targetSpace = (IntPtr)0;
if (pos.Z < 0) // if (pos.Z < 0)
if (pos.Z < parent_scene.GetTerrainHeightAtXY(pos.X, pos.Y))
m_isphysical = false; m_isphysical = false;
else else
{ {