aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorlbsa712007-11-05 14:38:58 +0000
committerlbsa712007-11-05 14:38:58 +0000
commitf6c8c10d3fce8eb279608cdeb9d8154fbca3852c (patch)
treee694744ba737b671cf77407c210263244b6b65ca /OpenSim
parentadd a fixup for linux building (diff)
downloadopensim-SC-f6c8c10d3fce8eb279608cdeb9d8154fbca3852c.zip
opensim-SC-f6c8c10d3fce8eb279608cdeb9d8154fbca3852c.tar.gz
opensim-SC-f6c8c10d3fce8eb279608cdeb9d8154fbca3852c.tar.bz2
opensim-SC-f6c8c10d3fce8eb279608cdeb9d8154fbca3852c.tar.xz
* 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 does
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/IClientAPI.cs14
-rw-r--r--OpenSim/Region/ClientStack/ClientView.API.cs8
-rw-r--r--OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs44
4 files changed, 33 insertions, 35 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 7fcbe9e..c18216e 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -183,19 +183,13 @@ namespace OpenSim.Framework
183 183
184 public delegate void RequestAvatarProperties(IClientAPI remoteClient, LLUUID avatarID); 184 public delegate void RequestAvatarProperties(IClientAPI remoteClient, LLUUID avatarID);
185 185
186 public delegate void GenericCall(IClientAPI remoteClient);
187
188 public delegate void GenericCall2(); 186 public delegate void GenericCall2();
189 187
190 public delegate void GenericCall3(Packet packet);
191
192 // really don't want to be passing packets in these events, so this is very temporary. 188 // really don't want to be passing packets in these events, so this is very temporary.
193 public delegate void GenericCall4(Packet packet, IClientAPI remoteClient); 189 public delegate void GenericCall4(Packet packet, IClientAPI remoteClient);
194 190
195 public delegate void GenericCall5(IClientAPI remoteClient, bool status); 191 public delegate void GenericCall5(IClientAPI remoteClient, bool status);
196 192
197 public delegate void GenericCall6(LLUUID uid);
198
199 public delegate void GenericCall7(uint localID, string message); 193 public delegate void GenericCall7(uint localID, string message);
200 194
201 public delegate void UpdateShape(uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock); 195 public delegate void UpdateShape(uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock);
@@ -299,13 +293,13 @@ namespace OpenSim.Framework
299 event RequestAvatarProperties OnRequestAvatarProperties; 293 event RequestAvatarProperties OnRequestAvatarProperties;
300 294
301 event GenericCall4 OnDeRezObject; 295 event GenericCall4 OnDeRezObject;
302 event GenericCall OnRegionHandShakeReply; 296 event Action<IClientAPI> OnRegionHandShakeReply;
303 event GenericCall OnRequestWearables; 297 event GenericCall2 OnRequestWearables;
304 event GenericCall2 OnCompleteMovementToRegion; 298 event GenericCall2 OnCompleteMovementToRegion;
305 event UpdateAgent OnAgentUpdate; 299 event UpdateAgent OnAgentUpdate;
306 event AgentRequestSit OnAgentRequestSit; 300 event AgentRequestSit OnAgentRequestSit;
307 event AgentSit OnAgentSit; 301 event AgentSit OnAgentSit;
308 event GenericCall OnRequestAvatarsData; 302 event Action<IClientAPI> OnRequestAvatarsData;
309 event AddNewPrim OnAddPrim; 303 event AddNewPrim OnAddPrim;
310 event ObjectDuplicate OnObjectDuplicate; 304 event ObjectDuplicate OnObjectDuplicate;
311 event UpdateVector OnGrabObject; 305 event UpdateVector OnGrabObject;
@@ -328,7 +322,7 @@ namespace OpenSim.Framework
328 event UpdateVector OnUpdatePrimScale; 322 event UpdateVector OnUpdatePrimScale;
329 event StatusChange OnChildAgentStatus; 323 event StatusChange OnChildAgentStatus;
330 event GenericCall2 OnStopMovement; 324 event GenericCall2 OnStopMovement;
331 event GenericCall6 OnRemoveAvatar; 325 event Action<LLUUID> OnRemoveAvatar;
332 326
333 event CreateNewInventoryItem OnCreateNewInventoryItem; 327 event CreateNewInventoryItem OnCreateNewInventoryItem;
334 event CreateInventoryFolder OnCreateNewInventoryFolder; 328 event CreateInventoryFolder OnCreateNewInventoryFolder;
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index b02fcf6..1ffcd5e 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -48,15 +48,15 @@ namespace OpenSim.Region.ClientStack
48 public event RezObject OnRezObject; 48 public event RezObject OnRezObject;
49 public event GenericCall4 OnDeRezObject; 49 public event GenericCall4 OnDeRezObject;
50 public event ModifyTerrain OnModifyTerrain; 50 public event ModifyTerrain OnModifyTerrain;
51 public event GenericCall OnRegionHandShakeReply; 51 public event Action<IClientAPI> OnRegionHandShakeReply;
52 public event GenericCall OnRequestWearables; 52 public event GenericCall2 OnRequestWearables;
53 public event SetAppearance OnSetAppearance; 53 public event SetAppearance OnSetAppearance;
54 public event GenericCall2 OnCompleteMovementToRegion; 54 public event GenericCall2 OnCompleteMovementToRegion;
55 public event UpdateAgent OnAgentUpdate; 55 public event UpdateAgent OnAgentUpdate;
56 public event AgentRequestSit OnAgentRequestSit; 56 public event AgentRequestSit OnAgentRequestSit;
57 public event AgentSit OnAgentSit; 57 public event AgentSit OnAgentSit;
58 public event StartAnim OnStartAnim; 58 public event StartAnim OnStartAnim;
59 public event GenericCall OnRequestAvatarsData; 59 public event Action<IClientAPI> OnRequestAvatarsData;
60 public event LinkObjects OnLinkObjects; 60 public event LinkObjects OnLinkObjects;
61 public event UpdateVector OnGrabObject; 61 public event UpdateVector OnGrabObject;
62 public event ObjectSelect OnDeGrabObject; 62 public event ObjectSelect OnDeGrabObject;
@@ -79,7 +79,7 @@ namespace OpenSim.Region.ClientStack
79 public event UpdateVector OnUpdatePrimScale; 79 public event UpdateVector OnUpdatePrimScale;
80 public event StatusChange OnChildAgentStatus; 80 public event StatusChange OnChildAgentStatus;
81 public event GenericCall2 OnStopMovement; 81 public event GenericCall2 OnStopMovement;
82 public event GenericCall6 OnRemoveAvatar; 82 public event Action<LLUUID> OnRemoveAvatar;
83 public event RequestMapBlocks OnRequestMapBlocks; 83 public event RequestMapBlocks OnRequestMapBlocks;
84 public event TeleportLocationRequest OnTeleportLocationRequest; 84 public event TeleportLocationRequest OnTeleportLocationRequest;
85 public event DisconnectUser OnDisconnectUser; 85 public event DisconnectUser OnDisconnectUser;
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
index 7c1a663..7a778e8 100644
--- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
+++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
@@ -158,7 +158,7 @@ namespace OpenSim.Region.ClientStack
158 case PacketType.AgentWearablesRequest: 158 case PacketType.AgentWearablesRequest:
159 if (OnRequestWearables != null) 159 if (OnRequestWearables != null)
160 { 160 {
161 OnRequestWearables(this); 161 OnRequestWearables( );
162 } 162 }
163 if (OnRequestAvatarsData != null) 163 if (OnRequestAvatarsData != null)
164 { 164 {
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 49e3c39..b08f39f 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.Environment.Scenes
53 private LLVector3 m_requestedSitOffset = new LLVector3(); 53 private LLVector3 m_requestedSitOffset = new LLVector3();
54 private float m_sitAvatarHeight = 2.0f; 54 private float m_sitAvatarHeight = 2.0f;
55 55
56 private Quaternion bodyRot; 56 private Quaternion m_bodyRot;
57 private byte[] m_visualParams; 57 private byte[] m_visualParams;
58 private AvatarWearable[] m_wearables; 58 private AvatarWearable[] m_wearables;
59 private LLObject.TextureEntry m_textureEntry; 59 private LLObject.TextureEntry m_textureEntry;
@@ -71,7 +71,7 @@ namespace OpenSim.Region.Environment.Scenes
71 private LLVector3 lastPhysPos = new LLVector3(); 71 private LLVector3 lastPhysPos = new LLVector3();
72 private int m_wearablesSerial = 1; 72 private int m_wearablesSerial = 1;
73 73
74 private List<ulong> m_KnownChildRegions = new List<ulong>(); //neighbouring regions we have enabled a child agent in 74 private readonly List<ulong> m_knownChildRegions = new List<ulong>(); //neighbouring regions we have enabled a child agent in
75 75
76 private enum Dir_ControlFlags 76 private enum Dir_ControlFlags
77 { 77 {
@@ -234,7 +234,7 @@ namespace OpenSim.Region.Environment.Scenes
234 234
235 public List<ulong> KnownChildRegions 235 public List<ulong> KnownChildRegions
236 { 236 {
237 get { return m_KnownChildRegions; } 237 get { return m_knownChildRegions; }
238 } 238 }
239 #endregion 239 #endregion
240 240
@@ -261,8 +261,8 @@ namespace OpenSim.Region.Environment.Scenes
261 Animations.LoadAnims(); 261 Animations.LoadAnims();
262 262
263 //register for events 263 //register for events
264 m_controllingClient.OnRequestWearables += SendOurAppearance; 264 m_controllingClient.OnRequestWearables += SendOwnAppearance;
265 m_controllingClient.OnSetAppearance += new SetAppearance(SetAppearance); 265 m_controllingClient.OnSetAppearance += SetAppearance;
266 m_controllingClient.OnCompleteMovementToRegion += CompleteMovement; 266 m_controllingClient.OnCompleteMovementToRegion += CompleteMovement;
267 m_controllingClient.OnCompleteMovementToRegion += SendInitialData; 267 m_controllingClient.OnCompleteMovementToRegion += SendInitialData;
268 m_controllingClient.OnAgentUpdate += HandleAgentUpdate; 268 m_controllingClient.OnAgentUpdate += HandleAgentUpdate;
@@ -409,17 +409,17 @@ namespace OpenSim.Region.Environment.Scenes
409 409
410 public void AddNeighbourRegion(ulong regionHandle) 410 public void AddNeighbourRegion(ulong regionHandle)
411 { 411 {
412 if (!m_KnownChildRegions.Contains(regionHandle)) 412 if (!m_knownChildRegions.Contains(regionHandle))
413 { 413 {
414 m_KnownChildRegions.Add(regionHandle); 414 m_knownChildRegions.Add(regionHandle);
415 } 415 }
416 } 416 }
417 417
418 public void RemoveNeighbourRegion(ulong regionHandle) 418 public void RemoveNeighbourRegion(ulong regionHandle)
419 { 419 {
420 if (!m_KnownChildRegions.Contains(regionHandle)) 420 if (!m_knownChildRegions.Contains(regionHandle))
421 { 421 {
422 m_KnownChildRegions.Remove(regionHandle); 422 m_knownChildRegions.Remove(regionHandle);
423 } 423 }
424 } 424 }
425 #endregion 425 #endregion
@@ -501,9 +501,9 @@ namespace OpenSim.Region.Environment.Scenes
501 update_movementflag = true; 501 update_movementflag = true;
502 } 502 }
503 503
504 if (q != bodyRot) 504 if (q != m_bodyRot)
505 { 505 {
506 bodyRot = q; 506 m_bodyRot = q;
507 update_rotation = true; 507 update_rotation = true;
508 } 508 }
509 509
@@ -765,10 +765,10 @@ namespace OpenSim.Region.Environment.Scenes
765 LLVector3 pos = AbsolutePosition; 765 LLVector3 pos = AbsolutePosition;
766 LLVector3 vel = Velocity; 766 LLVector3 vel = Velocity;
767 LLQuaternion rot; 767 LLQuaternion rot;
768 rot.X = bodyRot.x; 768 rot.X = m_bodyRot.x;
769 rot.Y = bodyRot.y; 769 rot.Y = m_bodyRot.y;
770 rot.Z = bodyRot.z; 770 rot.Z = m_bodyRot.z;
771 rot.W = bodyRot.w; 771 rot.W = m_bodyRot.w;
772 RemoteClient.SendAvatarTerseUpdate(m_regionHandle, 64096, LocalId, new LLVector3(pos.X, pos.Y, pos.Z), 772 RemoteClient.SendAvatarTerseUpdate(m_regionHandle, 64096, LocalId, new LLVector3(pos.X, pos.Y, pos.Z),
773 new LLVector3(vel.X, vel.Y, vel.Z), rot); 773 new LLVector3(vel.X, vel.Y, vel.Z), rot);
774 } 774 }
@@ -851,9 +851,9 @@ namespace OpenSim.Region.Environment.Scenes
851 /// 851 ///
852 /// </summary> 852 /// </summary>
853 /// <param name="client"></param> 853 /// <param name="client"></param>
854 public void SendOurAppearance(IClientAPI client) 854 public void SendOwnAppearance( )
855 { 855 {
856 client.SendWearables(m_wearables, m_wearablesSerial++); 856 SendOwnWearables( );
857 m_scene.SendAllSceneObjectsToClient(this); 857 m_scene.SendAllSceneObjectsToClient(this);
858 m_controllingClient.SendViewerTime(m_scene.TimePhase); 858 m_controllingClient.SendViewerTime(m_scene.TimePhase);
859 } 859 }
@@ -1101,8 +1101,12 @@ namespace OpenSim.Region.Environment.Scenes
1101 public void SetWearable(int wearableId, AvatarWearable wearable) 1101 public void SetWearable(int wearableId, AvatarWearable wearable)
1102 { 1102 {
1103 m_wearables[wearableId] = wearable; 1103 m_wearables[wearableId] = wearable;
1104 m_controllingClient.SendWearables(m_wearables, ++m_wearablesSerial); 1104 SendOwnWearables();
1105 //m_controllingClient.SendWearables(m_wearables, m_wearablesSerial++); 1105 }
1106
1107 private void SendOwnWearables()
1108 {
1109 m_controllingClient.SendWearables(m_wearables, m_wearablesSerial++);
1106 } 1110 }
1107 } 1111 }
1108} \ No newline at end of file 1112}