a few more changes relative to sits crossing
parent
07853c86ed
commit
e951f4cc96
|
@ -356,7 +356,7 @@ namespace OpenSim.Framework
|
||||||
public string ActiveGroupName;
|
public string ActiveGroupName;
|
||||||
public string ActiveGroupTitle = null;
|
public string ActiveGroupTitle = null;
|
||||||
public UUID agentCOF;
|
public UUID agentCOF;
|
||||||
public bool isCrossingUpdate;
|
public byte CrossingFlags;
|
||||||
|
|
||||||
public AgentGroupData[] Groups;
|
public AgentGroupData[] Groups;
|
||||||
public Dictionary<ulong, string> ChildrenCapSeeds = null;
|
public Dictionary<ulong, string> ChildrenCapSeeds = null;
|
||||||
|
@ -365,7 +365,6 @@ namespace OpenSim.Framework
|
||||||
public Animation AnimState = null;
|
public Animation AnimState = null;
|
||||||
public Byte MotionState = 0;
|
public Byte MotionState = 0;
|
||||||
|
|
||||||
public UUID GranterID;
|
|
||||||
public UUID ParentPart;
|
public UUID ParentPart;
|
||||||
public Vector3 SitOffset;
|
public Vector3 SitOffset;
|
||||||
|
|
||||||
|
@ -430,7 +429,7 @@ namespace OpenSim.Framework
|
||||||
args["agent_access"] = OSD.FromString(AgentAccess.ToString());
|
args["agent_access"] = OSD.FromString(AgentAccess.ToString());
|
||||||
|
|
||||||
args["agent_cof"] = OSD.FromUUID(agentCOF);
|
args["agent_cof"] = OSD.FromUUID(agentCOF);
|
||||||
args["crossingupdate"] = OSD.FromBoolean(isCrossingUpdate);
|
args["crossingflags"] = OSD.FromInteger(CrossingFlags);
|
||||||
|
|
||||||
args["active_group_id"] = OSD.FromUUID(ActiveGroupID);
|
args["active_group_id"] = OSD.FromUUID(ActiveGroupID);
|
||||||
args["active_group_name"] = OSD.FromString(ActiveGroupName);
|
args["active_group_name"] = OSD.FromString(ActiveGroupName);
|
||||||
|
@ -625,8 +624,8 @@ namespace OpenSim.Framework
|
||||||
if (args.ContainsKey("agent_cof") && args["agent_cof"] != null)
|
if (args.ContainsKey("agent_cof") && args["agent_cof"] != null)
|
||||||
agentCOF = args["agent_cof"].AsUUID();
|
agentCOF = args["agent_cof"].AsUUID();
|
||||||
|
|
||||||
if (args.ContainsKey("crossingupdate") && args["crossingupdate"] != null)
|
if (args.ContainsKey("crossingflags") && args["crossingflags"] != null)
|
||||||
isCrossingUpdate = args["crossingupdate"].AsBoolean();
|
CrossingFlags = (byte)args["crossingflags"].AsInteger();
|
||||||
|
|
||||||
if (args.ContainsKey("active_group_id") && args["active_group_id"] != null)
|
if (args.ContainsKey("active_group_id") && args["active_group_id"] != null)
|
||||||
ActiveGroupID = args["active_group_id"].AsUUID();
|
ActiveGroupID = args["active_group_id"].AsUUID();
|
||||||
|
|
|
@ -346,9 +346,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
get { return RootPart.VolumeDetectActive; }
|
get { return RootPart.VolumeDetectActive; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private Vector3 lastPhysGroupPos;
|
|
||||||
private Quaternion lastPhysGroupRot;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Is this entity set to be saved in persistent storage?
|
/// Is this entity set to be saved in persistent storage?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -702,10 +699,23 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
foreach (ScenePresence av in sog.m_sittingAvatars)
|
foreach (ScenePresence av in sog.m_sittingAvatars)
|
||||||
{
|
{
|
||||||
|
byte cflags = 1;
|
||||||
|
|
||||||
avtocrossInfo avinfo = new avtocrossInfo();
|
avtocrossInfo avinfo = new avtocrossInfo();
|
||||||
SceneObjectPart parentPart = sogScene.GetSceneObjectPart(av.ParentID);
|
SceneObjectPart parentPart = sogScene.GetSceneObjectPart(av.ParentID);
|
||||||
if (parentPart != null)
|
if (parentPart != null)
|
||||||
|
{
|
||||||
av.ParentUUID = parentPart.UUID;
|
av.ParentUUID = parentPart.UUID;
|
||||||
|
if(parentPart.SitTargetAvatar == av.UUID)
|
||||||
|
cflags = 7; // low 3 bits set
|
||||||
|
else
|
||||||
|
cflags = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 1 is crossing
|
||||||
|
// 2 is sitting
|
||||||
|
// 4 is sitting at sittarget
|
||||||
|
av.crossingFlags = cflags;
|
||||||
|
|
||||||
avinfo.av = av;
|
avinfo.av = av;
|
||||||
avinfo.ParentID = av.ParentID;
|
avinfo.ParentID = av.ParentID;
|
||||||
|
@ -750,7 +760,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
av.ParentUUID = UUID.Zero;
|
av.ParentUUID = UUID.Zero;
|
||||||
// In any case
|
// In any case
|
||||||
av.IsInTransit = false;
|
av.IsInTransit = false;
|
||||||
|
av.crossingFlags = 0;
|
||||||
m_log.DebugFormat("[SCENE OBJECT]: Crossing agent {0} {1} completed.", av.Firstname, av.Lastname);
|
m_log.DebugFormat("[SCENE OBJECT]: Crossing agent {0} {1} completed.", av.Firstname, av.Lastname);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -768,6 +778,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ScenePresence av = avinfo.av;
|
ScenePresence av = avinfo.av;
|
||||||
av.ParentUUID = UUID.Zero;
|
av.ParentUUID = UUID.Zero;
|
||||||
av.ParentID = avinfo.ParentID;
|
av.ParentID = avinfo.ParentID;
|
||||||
|
av.crossingFlags = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
avsToCross.Clear();
|
avsToCross.Clear();
|
||||||
|
|
|
@ -570,6 +570,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public bool haveGroupInformation;
|
public bool haveGroupInformation;
|
||||||
public bool gotCrossUpdate;
|
public bool gotCrossUpdate;
|
||||||
|
public byte crossingFlags;
|
||||||
|
|
||||||
public string Grouptitle
|
public string Grouptitle
|
||||||
{
|
{
|
||||||
|
@ -1231,8 +1232,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
part.AddSittingAvatar(this);
|
part.AddSittingAvatar(this);
|
||||||
if (part.SitTargetPosition != Vector3.Zero)
|
// if not actually on the target invalidate it
|
||||||
part.SitTargetAvatar = UUID;
|
if(gotCrossUpdate && (crossingFlags & 0x04) == 0)
|
||||||
|
part.SitTargetAvatar = UUID.Zero;
|
||||||
|
|
||||||
ParentID = part.LocalId;
|
ParentID = part.LocalId;
|
||||||
ParentPart = part;
|
ParentPart = part;
|
||||||
m_pos = PrevSitOffset;
|
m_pos = PrevSitOffset;
|
||||||
|
@ -1505,6 +1508,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
haveGroupInformation = false;
|
haveGroupInformation = false;
|
||||||
gotCrossUpdate = false;
|
gotCrossUpdate = false;
|
||||||
|
crossingFlags = 0;
|
||||||
m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd;
|
m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd;
|
||||||
|
|
||||||
RegionHandle = newRegionHandle;
|
RegionHandle = newRegionHandle;
|
||||||
|
@ -2212,6 +2216,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
haveGroupInformation = true;
|
haveGroupInformation = true;
|
||||||
gotCrossUpdate = false;
|
gotCrossUpdate = false;
|
||||||
|
crossingFlags = 0;
|
||||||
|
|
||||||
m_scene.EventManager.OnRegionHeartbeatEnd += RegionHeartbeatEnd;
|
m_scene.EventManager.OnRegionHeartbeatEnd += RegionHeartbeatEnd;
|
||||||
|
|
||||||
|
@ -4552,11 +4557,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (Scene.AttachmentsModule != null)
|
if (Scene.AttachmentsModule != null)
|
||||||
Scene.AttachmentsModule.CopyAttachments(this, cAgent);
|
Scene.AttachmentsModule.CopyAttachments(this, cAgent);
|
||||||
|
|
||||||
cAgent.isCrossingUpdate = isCrossUpdate;
|
cAgent.CrossingFlags = isCrossUpdate ? crossingFlags : (byte)0;
|
||||||
|
|
||||||
if(isCrossUpdate && haveGroupInformation)
|
if(isCrossUpdate && haveGroupInformation)
|
||||||
{
|
{
|
||||||
|
|
||||||
cAgent.agentCOF = COF;
|
cAgent.agentCOF = COF;
|
||||||
cAgent.ActiveGroupID = ControllingClient.ActiveGroupId;
|
cAgent.ActiveGroupID = ControllingClient.ActiveGroupId;
|
||||||
cAgent.ActiveGroupName = ControllingClient.ActiveGroupName;
|
cAgent.ActiveGroupName = ControllingClient.ActiveGroupName;
|
||||||
|
@ -4705,8 +4709,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gotCrossUpdate = cAgent.isCrossingUpdate;
|
crossingFlags = cAgent.CrossingFlags;
|
||||||
|
gotCrossUpdate = (crossingFlags != 0);
|
||||||
|
|
||||||
lock (m_originRegionIDAccessLock)
|
lock (m_originRegionIDAccessLock)
|
||||||
m_originRegionID = cAgent.RegionID;
|
m_originRegionID = cAgent.RegionID;
|
||||||
|
|
Loading…
Reference in New Issue