Adding SOG/SOP to ScenePresence working more but confusion on UUID of presence vs SOG

dsg
Robert Adams 2011-02-24 14:41:16 -08:00
parent 1ff16c93a3
commit 2335968271
3 changed files with 19 additions and 8 deletions

View File

@ -1969,7 +1969,8 @@ namespace OpenSim.Region.Framework.Scenes
}
else
{
m_log.Warn("Entity with " + sogID + " is not of type SceneObjectGroup");
m_log.WarnFormat("{0}: Entity with {1} is not of type SceneObjectGroup: {2}",
"[SCENE GRAPH]", sogID, entity.GetType().ToString());
//return false;
}
return false;
@ -2008,7 +2009,8 @@ namespace OpenSim.Region.Framework.Scenes
}
else
{
m_log.Warn("Entity with " + sogID + " is not of type SceneObjectGroup");
m_log.WarnFormat("{0}: Entity with {1} iss not of type SceneObjectGroup: {2}",
"[SCENE GRAPH]", sogID, entity.GetType().ToString());
//return false;
updateResult = Scene.ObjectUpdateResult.Error;
}

View File

@ -166,7 +166,7 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_physActor; }
set
{
// m_log.DebugFormat("[SOP]: PhysActor set to {0} for {1} {2}", value, Name, UUID);
m_log.DebugFormat("[SCENE OBJECT PART]: PhysActor set to {0} for {1} {2}", value, Name, UUID);
m_physActor = value;
}
}
@ -2744,7 +2744,8 @@ namespace OpenSim.Region.Framework.Scenes
if (PhysActor != null)
{
Vector3 newpos = new Vector3(PhysActor.Position.GetBytes(), 0);
// Vector3 newpos = new Vector3(PhysActor.Position.GetBytes(), 0);
Vector3 newpos = new Vector3(PhysActor.Position);
if (m_parentGroup == null)
{
@ -2761,7 +2762,7 @@ namespace OpenSim.Region.Framework.Scenes
m_parentGroup.AbsolutePosition = newpos;
return;
}
m_log.DebugFormat("[PHYSICS]: TerseUpdate: newpos={0}", newpos.ToString());
m_log.DebugFormat("[PHYSICS]: TerseUpdate: UUID={0}, newpos={1}", PhysActor.UUID.ToString(), newpos.ToString());
//m_parentGroup.RootPart.m_groupPosition = newpos;
}
//ScheduleTerseUpdate();

View File

@ -2451,7 +2451,7 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary>
public void SendTerseUpdateToAllClients()
{
m_log.DebugFormat("[SCENE PRESENCE]: TerseUpdate: pos={0}", m_physicsActor.Position.ToString());
m_log.DebugFormat("[SCENE PRESENCE]: TerseUpdate: UUID={0}, pos={1}", m_physicsActor.UUID.ToString(), m_physicsActor.Position.ToString());
// REGION SYNC
if (m_scene.IsSyncedServer())
{
@ -3392,11 +3392,19 @@ namespace OpenSim.Region.Framework.Scenes
m_physicsActor.LocalID = LocalId;
m_physicsActor.UUID = this.UUID;
m_sop = new SceneObjectPart(this.UUID, new PrimitiveBaseShape(), Vector3.Zero, Quaternion.Identity, Vector3.Zero);
m_sop = new SceneObjectPart(this.UUID, new PrimitiveBaseShape(),
new Vector3(1f,1f,1f), Quaternion.Identity, new Vector3(2f, 2f, 2f));
// Vector3.Zero, Quaternion.Identity, Vector3.Zero);
m_sop.PhysActor = m_physicsActor;
m_sop.InitializeBucketSyncInfo();
// pull the values from the PhysActor into the SOP
Vector3 temp = m_sop.GroupPosition;
temp = m_sop.OffsetPosition;
Quaternion tempq = m_sop.RotationOffset;
m_sog = new SceneObjectGroup(m_sop, true);
m_sog.Scene = m_scene;
// m_sog.Scene = m_scene;
m_sog.AttachToSceneBySync(m_scene);
}
private void OutOfBoundsCall(Vector3 pos)