mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster
This commit is contained in:
@@ -29,7 +29,7 @@ namespace OpenSim
|
||||
{
|
||||
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;
|
||||
public enum Flavour
|
||||
{
|
||||
|
||||
@@ -222,6 +222,30 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
protected internal bool AddRestoredSceneObject(
|
||||
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)
|
||||
{
|
||||
sceneObject.ForceInventoryPersistence();
|
||||
|
||||
@@ -215,6 +215,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||
parent_scene.GetTerrainHeightAtXY(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f)) + 0.5f);
|
||||
m_log.Warn("[PHYSICS]: Got nonFinite Object create Position");
|
||||
}
|
||||
|
||||
_position = pos;
|
||||
m_taintposition = pos;
|
||||
PID_D = parent_scene.bodyPIDD;
|
||||
@@ -254,7 +255,8 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||
_parent_scene = parent_scene;
|
||||
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;
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user