aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorlbsa712007-11-05 14:38:58 +0000
committerlbsa712007-11-05 14:38:58 +0000
commitf6c8c10d3fce8eb279608cdeb9d8154fbca3852c (patch)
treee694744ba737b671cf77407c210263244b6b65ca /OpenSim/Region/Environment
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/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs44
1 files changed, 24 insertions, 20 deletions
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}