* Substituted som 'GenericCall' with Action<>
* OnRequestWearables does no longer accept 'Client' as param, since it's always on the current client * Fixed SendOwnWearables to always operate on self, as that's what it doesafrisby
parent
3aac47f769
commit
f6c8c10d3f
|
@ -183,19 +183,13 @@ namespace OpenSim.Framework
|
|||
|
||||
public delegate void RequestAvatarProperties(IClientAPI remoteClient, LLUUID avatarID);
|
||||
|
||||
public delegate void GenericCall(IClientAPI remoteClient);
|
||||
|
||||
public delegate void GenericCall2();
|
||||
|
||||
public delegate void GenericCall3(Packet packet);
|
||||
|
||||
// really don't want to be passing packets in these events, so this is very temporary.
|
||||
public delegate void GenericCall4(Packet packet, IClientAPI remoteClient);
|
||||
|
||||
public delegate void GenericCall5(IClientAPI remoteClient, bool status);
|
||||
|
||||
public delegate void GenericCall6(LLUUID uid);
|
||||
|
||||
public delegate void GenericCall7(uint localID, string message);
|
||||
|
||||
public delegate void UpdateShape(uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock);
|
||||
|
@ -299,13 +293,13 @@ namespace OpenSim.Framework
|
|||
event RequestAvatarProperties OnRequestAvatarProperties;
|
||||
|
||||
event GenericCall4 OnDeRezObject;
|
||||
event GenericCall OnRegionHandShakeReply;
|
||||
event GenericCall OnRequestWearables;
|
||||
event Action<IClientAPI> OnRegionHandShakeReply;
|
||||
event GenericCall2 OnRequestWearables;
|
||||
event GenericCall2 OnCompleteMovementToRegion;
|
||||
event UpdateAgent OnAgentUpdate;
|
||||
event AgentRequestSit OnAgentRequestSit;
|
||||
event AgentSit OnAgentSit;
|
||||
event GenericCall OnRequestAvatarsData;
|
||||
event Action<IClientAPI> OnRequestAvatarsData;
|
||||
event AddNewPrim OnAddPrim;
|
||||
event ObjectDuplicate OnObjectDuplicate;
|
||||
event UpdateVector OnGrabObject;
|
||||
|
@ -328,7 +322,7 @@ namespace OpenSim.Framework
|
|||
event UpdateVector OnUpdatePrimScale;
|
||||
event StatusChange OnChildAgentStatus;
|
||||
event GenericCall2 OnStopMovement;
|
||||
event GenericCall6 OnRemoveAvatar;
|
||||
event Action<LLUUID> OnRemoveAvatar;
|
||||
|
||||
event CreateNewInventoryItem OnCreateNewInventoryItem;
|
||||
event CreateInventoryFolder OnCreateNewInventoryFolder;
|
||||
|
|
|
@ -48,15 +48,15 @@ namespace OpenSim.Region.ClientStack
|
|||
public event RezObject OnRezObject;
|
||||
public event GenericCall4 OnDeRezObject;
|
||||
public event ModifyTerrain OnModifyTerrain;
|
||||
public event GenericCall OnRegionHandShakeReply;
|
||||
public event GenericCall OnRequestWearables;
|
||||
public event Action<IClientAPI> OnRegionHandShakeReply;
|
||||
public event GenericCall2 OnRequestWearables;
|
||||
public event SetAppearance OnSetAppearance;
|
||||
public event GenericCall2 OnCompleteMovementToRegion;
|
||||
public event UpdateAgent OnAgentUpdate;
|
||||
public event AgentRequestSit OnAgentRequestSit;
|
||||
public event AgentSit OnAgentSit;
|
||||
public event StartAnim OnStartAnim;
|
||||
public event GenericCall OnRequestAvatarsData;
|
||||
public event Action<IClientAPI> OnRequestAvatarsData;
|
||||
public event LinkObjects OnLinkObjects;
|
||||
public event UpdateVector OnGrabObject;
|
||||
public event ObjectSelect OnDeGrabObject;
|
||||
|
@ -79,7 +79,7 @@ namespace OpenSim.Region.ClientStack
|
|||
public event UpdateVector OnUpdatePrimScale;
|
||||
public event StatusChange OnChildAgentStatus;
|
||||
public event GenericCall2 OnStopMovement;
|
||||
public event GenericCall6 OnRemoveAvatar;
|
||||
public event Action<LLUUID> OnRemoveAvatar;
|
||||
public event RequestMapBlocks OnRequestMapBlocks;
|
||||
public event TeleportLocationRequest OnTeleportLocationRequest;
|
||||
public event DisconnectUser OnDisconnectUser;
|
||||
|
|
|
@ -158,7 +158,7 @@ namespace OpenSim.Region.ClientStack
|
|||
case PacketType.AgentWearablesRequest:
|
||||
if (OnRequestWearables != null)
|
||||
{
|
||||
OnRequestWearables(this);
|
||||
OnRequestWearables( );
|
||||
}
|
||||
if (OnRequestAvatarsData != null)
|
||||
{
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
private LLVector3 m_requestedSitOffset = new LLVector3();
|
||||
private float m_sitAvatarHeight = 2.0f;
|
||||
|
||||
private Quaternion bodyRot;
|
||||
private Quaternion m_bodyRot;
|
||||
private byte[] m_visualParams;
|
||||
private AvatarWearable[] m_wearables;
|
||||
private LLObject.TextureEntry m_textureEntry;
|
||||
|
@ -71,7 +71,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
private LLVector3 lastPhysPos = new LLVector3();
|
||||
private int m_wearablesSerial = 1;
|
||||
|
||||
private List<ulong> m_KnownChildRegions = new List<ulong>(); //neighbouring regions we have enabled a child agent in
|
||||
private readonly List<ulong> m_knownChildRegions = new List<ulong>(); //neighbouring regions we have enabled a child agent in
|
||||
|
||||
private enum Dir_ControlFlags
|
||||
{
|
||||
|
@ -234,7 +234,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
public List<ulong> KnownChildRegions
|
||||
{
|
||||
get { return m_KnownChildRegions; }
|
||||
get { return m_knownChildRegions; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -261,8 +261,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
Animations.LoadAnims();
|
||||
|
||||
//register for events
|
||||
m_controllingClient.OnRequestWearables += SendOurAppearance;
|
||||
m_controllingClient.OnSetAppearance += new SetAppearance(SetAppearance);
|
||||
m_controllingClient.OnRequestWearables += SendOwnAppearance;
|
||||
m_controllingClient.OnSetAppearance += SetAppearance;
|
||||
m_controllingClient.OnCompleteMovementToRegion += CompleteMovement;
|
||||
m_controllingClient.OnCompleteMovementToRegion += SendInitialData;
|
||||
m_controllingClient.OnAgentUpdate += HandleAgentUpdate;
|
||||
|
@ -409,17 +409,17 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
public void AddNeighbourRegion(ulong regionHandle)
|
||||
{
|
||||
if (!m_KnownChildRegions.Contains(regionHandle))
|
||||
if (!m_knownChildRegions.Contains(regionHandle))
|
||||
{
|
||||
m_KnownChildRegions.Add(regionHandle);
|
||||
m_knownChildRegions.Add(regionHandle);
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveNeighbourRegion(ulong regionHandle)
|
||||
{
|
||||
if (!m_KnownChildRegions.Contains(regionHandle))
|
||||
if (!m_knownChildRegions.Contains(regionHandle))
|
||||
{
|
||||
m_KnownChildRegions.Remove(regionHandle);
|
||||
m_knownChildRegions.Remove(regionHandle);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
@ -501,9 +501,9 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
update_movementflag = true;
|
||||
}
|
||||
|
||||
if (q != bodyRot)
|
||||
if (q != m_bodyRot)
|
||||
{
|
||||
bodyRot = q;
|
||||
m_bodyRot = q;
|
||||
update_rotation = true;
|
||||
}
|
||||
|
||||
|
@ -765,10 +765,10 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
LLVector3 pos = AbsolutePosition;
|
||||
LLVector3 vel = Velocity;
|
||||
LLQuaternion rot;
|
||||
rot.X = bodyRot.x;
|
||||
rot.Y = bodyRot.y;
|
||||
rot.Z = bodyRot.z;
|
||||
rot.W = bodyRot.w;
|
||||
rot.X = m_bodyRot.x;
|
||||
rot.Y = m_bodyRot.y;
|
||||
rot.Z = m_bodyRot.z;
|
||||
rot.W = m_bodyRot.w;
|
||||
RemoteClient.SendAvatarTerseUpdate(m_regionHandle, 64096, LocalId, new LLVector3(pos.X, pos.Y, pos.Z),
|
||||
new LLVector3(vel.X, vel.Y, vel.Z), rot);
|
||||
}
|
||||
|
@ -851,9 +851,9 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
///
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
public void SendOurAppearance(IClientAPI client)
|
||||
public void SendOwnAppearance( )
|
||||
{
|
||||
client.SendWearables(m_wearables, m_wearablesSerial++);
|
||||
SendOwnWearables( );
|
||||
m_scene.SendAllSceneObjectsToClient(this);
|
||||
m_controllingClient.SendViewerTime(m_scene.TimePhase);
|
||||
}
|
||||
|
@ -1101,8 +1101,12 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
public void SetWearable(int wearableId, AvatarWearable wearable)
|
||||
{
|
||||
m_wearables[wearableId] = wearable;
|
||||
m_controllingClient.SendWearables(m_wearables, ++m_wearablesSerial);
|
||||
//m_controllingClient.SendWearables(m_wearables, m_wearablesSerial++);
|
||||
SendOwnWearables();
|
||||
}
|
||||
|
||||
private void SendOwnWearables()
|
||||
{
|
||||
m_controllingClient.SendWearables(m_wearables, m_wearablesSerial++);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue