* Slowly but surely working my way towards Regionality...
parent
80a9b81448
commit
34043cd351
|
@ -504,11 +504,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
public void StartAnimation(IClientAPI client, LLUUID animID, int seq)
|
||||
public void StartAnimation(LLUUID animID, int seq, LLUUID agentId)
|
||||
{
|
||||
ForEachScenePresence(delegate(ScenePresence presence)
|
||||
Broadcast(delegate(IClientAPI client)
|
||||
{
|
||||
presence.ControllingClient.SendAnimation(animID, seq, client.AgentId);
|
||||
client.SendAnimation(animID, seq, agentId);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -367,6 +367,10 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
updateLock.ReleaseMutex();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Perform delegate action on all clients subscribing to updates from this region.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
internal void Broadcast(Action<IClientAPI> whatToDo)
|
||||
{
|
||||
m_region.Broadcast(whatToDo);
|
||||
|
@ -775,7 +779,6 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
client.SendKillObject(avatar.RegionHandle, avatar.LocalId);
|
||||
});
|
||||
|
||||
|
||||
ForEachScenePresence(
|
||||
delegate(ScenePresence presence)
|
||||
{
|
||||
|
@ -897,10 +900,18 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
|
||||
public void SendKillObject(uint localID)
|
||||
{
|
||||
Broadcast(delegate(IClientAPI client)
|
||||
{
|
||||
client.SendKillObject(m_regionHandle, localID);
|
||||
});
|
||||
}
|
||||
|
||||
public void NotifyMyCoarseLocationChange()
|
||||
{
|
||||
ForEachScenePresence(delegate(ScenePresence presence)
|
||||
{
|
||||
presence.ControllingClient.SendKillObject(m_regionHandle, localID);
|
||||
presence.CoarseLocationChange();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
public bool IsRestrictedToRegion = false;
|
||||
|
||||
private bool m_newForce = false;
|
||||
private bool newAvatar = false;
|
||||
private bool newCoarseLocations = true;
|
||||
private bool m_newAvatar = false;
|
||||
private bool m_newCoarseLocations = true;
|
||||
|
||||
protected RegionInfo m_regionInfo;
|
||||
protected ulong crossingFromRegion = 0;
|
||||
|
@ -279,7 +279,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
//temporary until we move some code into the body classes
|
||||
|
||||
if (newAvatar)
|
||||
if (m_newAvatar)
|
||||
{
|
||||
//do we need to use newAvatar? not sure so have added this to kill the compile warning
|
||||
}
|
||||
|
@ -338,7 +338,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
public void MakeAvatarPhysical(LLVector3 pos, bool isFlying)
|
||||
{
|
||||
newAvatar = true;
|
||||
m_newAvatar = true;
|
||||
m_isChildAgent = false;
|
||||
|
||||
AbsolutePosition = pos;
|
||||
|
@ -402,7 +402,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
visualParams[i] = visualParam[i].ParamValue;
|
||||
}
|
||||
|
||||
SendArrearanceToAllOtherAgents();
|
||||
SendAppearanceToAllOtherAgents();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -541,10 +541,10 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
SendPrimUpdates();
|
||||
|
||||
if (newCoarseLocations)
|
||||
if (m_newCoarseLocations)
|
||||
{
|
||||
SendCoarseLocations();
|
||||
newCoarseLocations = false;
|
||||
m_newCoarseLocations = false;
|
||||
}
|
||||
|
||||
if (m_isChildAgent == false)
|
||||
|
@ -605,13 +605,9 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
/// </summary>
|
||||
public void SendTerseUpdateToAllClients()
|
||||
{
|
||||
m_scene.ForEachScenePresence(delegate(ScenePresence presence)
|
||||
{
|
||||
SendTerseUpdateToClient(presence.m_controllingClient);
|
||||
});
|
||||
m_scene.Broadcast( SendTerseUpdateToClient );
|
||||
}
|
||||
|
||||
|
||||
public void SendCoarseLocations()
|
||||
{
|
||||
List<LLVector3> CoarseLocations = new List<LLVector3>();
|
||||
|
@ -629,19 +625,10 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
public void CoarseLocationChange()
|
||||
{
|
||||
newCoarseLocations = true;
|
||||
m_newCoarseLocations = true;
|
||||
}
|
||||
|
||||
private void NotifyMyCoarseLocationChange()
|
||||
{
|
||||
m_scene.ForEachScenePresence(delegate(ScenePresence presence)
|
||||
{
|
||||
if (presence != this)
|
||||
{
|
||||
presence.CoarseLocationChange();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
@ -681,11 +668,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if (!m_isChildAgent)
|
||||
{
|
||||
m_scene.InformClientOfNeighbours(m_controllingClient);
|
||||
newAvatar = false;
|
||||
m_newAvatar = false;
|
||||
}
|
||||
|
||||
SendFullUpdateToAllClients();
|
||||
SendArrearanceToAllOtherAgents();
|
||||
SendAppearanceToAllOtherAgents();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -697,7 +684,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
m_controllingClient.SendWearables(Wearables);
|
||||
|
||||
//this.SendFullUpdateToAllClients();
|
||||
//this.SendArrearanceToAllOtherAgents();
|
||||
//this.SendAppearanceToAllOtherAgents();
|
||||
|
||||
m_scene.SendAllSceneObjectsToClient(this);
|
||||
m_controllingClient.SendViewerTime(m_scene.TimePhase);
|
||||
|
@ -716,11 +703,14 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void SendArrearanceToAllOtherAgents()
|
||||
public void SendAppearanceToAllOtherAgents()
|
||||
{
|
||||
m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
|
||||
{
|
||||
if (scenePresence != this)
|
||||
{
|
||||
SendAppearanceToOtherAgent(scenePresence);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -743,11 +733,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
CurrentAnimation = animID;
|
||||
AnimationSeq = seq;
|
||||
LLUUID sourceAgentId = m_controllingClient.AgentId;
|
||||
|
||||
m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
|
||||
m_scene.Broadcast(delegate(IClientAPI client)
|
||||
{
|
||||
scenePresence.m_controllingClient.SendAnimation(animID, seq,
|
||||
m_controllingClient.AgentId);
|
||||
client.SendAnimation(animID, seq, sourceAgentId);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -771,7 +761,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if (OnSignificantClientMovement != null)
|
||||
{
|
||||
OnSignificantClientMovement(m_controllingClient);
|
||||
NotifyMyCoarseLocationChange();
|
||||
m_scene.NotifyMyCoarseLocationChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -845,14 +835,13 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
m_physicsActor.Flying);
|
||||
if (res)
|
||||
{
|
||||
//TODO: following line is hard coded to port 9000, really need to change this as soon as possible
|
||||
AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo();
|
||||
string capsPath = Util.GetCapsURL(m_controllingClient.AgentId);
|
||||
m_controllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint,
|
||||
capsPath);
|
||||
MakeChildAgent();
|
||||
m_scene.SendKillObject(m_localId);
|
||||
NotifyMyCoarseLocationChange();
|
||||
m_scene.NotifyMyCoarseLocationChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue