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