* Resolved the situation where prim is loaded from storage and when pushed never stops.
parent
eb2f626561
commit
5fd2fa687e
|
@ -553,6 +553,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
|
||||
new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
|
||||
rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics);
|
||||
rootPart.doPhysicsPropertyUpdate(UsePhysics);
|
||||
}
|
||||
MainLog.Instance.Verbose("Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)");
|
||||
}
|
||||
|
|
|
@ -472,7 +472,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
m_regionHandle = regionHandle;
|
||||
m_parentGroup = parent;
|
||||
|
||||
TimeStampTerse = (uint)Util.UnixTimeSinceEpoch();
|
||||
CreationDate = creationDate;
|
||||
OwnerID = ownerID;
|
||||
CreatorID = creatorID;
|
||||
|
@ -490,6 +490,9 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
OffsetPosition = position;
|
||||
RotationOffset = rotation;
|
||||
ObjectFlags = flags;
|
||||
bool UsePhysics = ((ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0);
|
||||
doPhysicsPropertyUpdate(UsePhysics);
|
||||
ScheduleFullUpdate();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -502,7 +505,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
public static SceneObjectPart FromXml(XmlReader xmlReader)
|
||||
{
|
||||
XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart));
|
||||
return (SceneObjectPart) serializer.Deserialize(xmlReader);
|
||||
SceneObjectPart newobject = (SceneObjectPart) serializer.Deserialize(xmlReader);
|
||||
bool UsePhysics = ((newobject.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0);
|
||||
newobject.doPhysicsPropertyUpdate(UsePhysics);
|
||||
|
||||
return newobject;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -567,6 +574,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
byte[] extraP = new byte[Shape.ExtraParams.Length];
|
||||
Array.Copy(Shape.ExtraParams, extraP, extraP.Length);
|
||||
dupe.Shape.ExtraParams = extraP;
|
||||
bool UsePhysics = ((dupe.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0);
|
||||
dupe.doPhysicsPropertyUpdate(UsePhysics);
|
||||
|
||||
return dupe;
|
||||
}
|
||||
|
@ -890,8 +899,9 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
// System.Console.WriteLine("Update: PHY:" + UsePhysics.ToString() + ", T:" + IsTemporary.ToString() + ", PHA:" + IsPhantom.ToString() + " S:" + CastsShadows.ToString());
|
||||
ScheduleFullUpdate();
|
||||
}
|
||||
private void doPhysicsPropertyUpdate(bool UsePhysics)
|
||||
public void doPhysicsPropertyUpdate(bool UsePhysics)
|
||||
{
|
||||
|
||||
if (PhysActor != null)
|
||||
{
|
||||
if (PhysActor.IsPhysical)
|
||||
|
@ -903,6 +913,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
/// that's not wholesome. Had to make m_scene public
|
||||
PhysActor = null;
|
||||
|
||||
if (!((ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) != 0))
|
||||
{
|
||||
PhysActor = m_parentGroup.m_scene.PhysScene.AddPrimShape(
|
||||
Name,
|
||||
Shape,
|
||||
|
@ -918,6 +930,14 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void UpdateExtraParam(ushort type, bool inUse, byte[] data)
|
||||
|
@ -1162,6 +1182,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
public void PhysicsRequestingTerseUpdate()
|
||||
{
|
||||
ScheduleTerseUpdate();
|
||||
|
||||
//SendTerseUpdateToAllClients();
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -337,12 +337,9 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
// could have been sent in the last update - we still need to send the
|
||||
// second here.
|
||||
|
||||
// after object un-linking was introduced, this broke and needs fixing
|
||||
// *all* object movements create a fullobjectupdate (which is bad)
|
||||
// Physical objects do not need this bit of code, so lets make sure that they don't
|
||||
// get updated and make matters worse until this gets fixed.
|
||||
|
||||
if (update.LastFullUpdateTime < part.TimeStampFull && !((part.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) !=0 ))
|
||||
|
||||
if (update.LastFullUpdateTime < part.TimeStampFull)
|
||||
{
|
||||
//need to do a full update
|
||||
part.SendFullUpdate(ControllingClient);
|
||||
|
@ -357,7 +354,10 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
else if (update.LastTerseUpdateTime <= part.TimeStampTerse)
|
||||
{
|
||||
|
||||
|
||||
part.SendTerseUpdate(ControllingClient);
|
||||
|
||||
update.LastTerseUpdateTime = part.TimeStampTerse;
|
||||
updateCount++;
|
||||
}
|
||||
|
|
|
@ -524,7 +524,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
newPrim = new OdePrim(name, this, targetspace, pos, siz, rot, mesh, pbs, isphysical);
|
||||
}
|
||||
_prims.Add(newPrim);
|
||||
OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICS", "Added Object");
|
||||
|
||||
return newPrim;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue