aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authormingchen2007-07-12 20:33:10 +0000
committermingchen2007-07-12 20:33:10 +0000
commitdf24ce6dfd803c5fcf6b0958ce14c455331a87b4 (patch)
treecab7170c4fee0bd32b5efed24c350bddfbd404c9 /OpenSim
parent*Found and fixed bug that crashed viewer when logging in or viewing land owners (diff)
downloadopensim-SC_OLD-df24ce6dfd803c5fcf6b0958ce14c455331a87b4.zip
opensim-SC_OLD-df24ce6dfd803c5fcf6b0958ce14c455331a87b4.tar.gz
opensim-SC_OLD-df24ce6dfd803c5fcf6b0958ce14c455331a87b4.tar.bz2
opensim-SC_OLD-df24ce6dfd803c5fcf6b0958ce14c455331a87b4.tar.xz
*Parcel and estate support fully restored into Sugilite
*Significant movement (currently set to 2 meters of movement for performance reasons, even though its speedy) and initial login now sends parcel updates
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/General/Interfaces/IClientAPI.cs2
-rw-r--r--OpenSim/Region/ClientStack/ClientView.API.cs2
-rw-r--r--OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs1
-rw-r--r--OpenSim/Region/Environment/ParcelManager.cs20
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs3
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs22
6 files changed, 43 insertions, 7 deletions
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
index 4d4a969..edd693e 100644
--- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs
+++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
@@ -75,6 +75,7 @@ namespace OpenSim.Framework.Interfaces
75 75
76 public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client); 76 public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client);
77 77
78
78 public interface IClientAPI 79 public interface IClientAPI
79 { 80 {
80 event ImprovedInstantMessage OnInstantMessage; 81 event ImprovedInstantMessage OnInstantMessage;
@@ -124,7 +125,6 @@ namespace OpenSim.Framework.Interfaces
124 event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 125 event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
125 126
126 event EstateOwnerMessageRequest OnEstateOwnerMessage; 127 event EstateOwnerMessageRequest OnEstateOwnerMessage;
127
128 LLVector3 StartPos 128 LLVector3 StartPos
129 { 129 {
130 get; 130 get;
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index 5be82dd..1c359c2 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -86,6 +86,8 @@ namespace OpenSim.Region.ClientStack
86 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 86 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
87 87
88 public event EstateOwnerMessageRequest OnEstateOwnerMessage; 88 public event EstateOwnerMessageRequest OnEstateOwnerMessage;
89
90
89 /// <summary> 91 /// <summary>
90 /// 92 ///
91 /// </summary> 93 /// </summary>
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
index e5249f9..df2bf34 100644
--- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
+++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
@@ -564,6 +564,7 @@ namespace OpenSim.Region.ClientStack
564 if (OnParcelPropertiesUpdateRequest != null) 564 if (OnParcelPropertiesUpdateRequest != null)
565 { 565 {
566 OnParcelPropertiesUpdateRequest(updatePacket, this); 566 OnParcelPropertiesUpdateRequest(updatePacket, this);
567
567 } 568 }
568 break; 569 break;
569 #endregion 570 #endregion
diff --git a/OpenSim/Region/Environment/ParcelManager.cs b/OpenSim/Region/Environment/ParcelManager.cs
index a1ed930..aca63a0 100644
--- a/OpenSim/Region/Environment/ParcelManager.cs
+++ b/OpenSim/Region/Environment/ParcelManager.cs
@@ -356,11 +356,11 @@ namespace OpenSim.Region.Environment
356 //Sale Flag 356 //Sale Flag
357 tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_IS_FOR_SALE); 357 tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_IS_FOR_SALE);
358 } 358 }
359 /*else if (currentParcelBlock.parcelData.ownerID == LLUUID.Zero) 359 else if (currentParcelBlock.parcelData.ownerID == LLUUID.Zero)
360 { 360 {
361 //Public Flag 361 //Public Flag
362 tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_PUBLIC); 362 tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_PUBLIC);
363 }*/ 363 }
364 else 364 else
365 { 365 {
366 //Other Flag 366 //Other Flag
@@ -395,7 +395,6 @@ namespace OpenSim.Region.Environment
395 packet = new ParcelOverlayPacket(); 395 packet = new ParcelOverlayPacket();
396 packet.ParcelData.Data = byteArray; 396 packet.ParcelData.Data = byteArray;
397 packet.ParcelData.SequenceID = sequenceID; 397 packet.ParcelData.SequenceID = sequenceID;
398 Console.WriteLine("SENT #" + sequenceID);
399 remote_client.OutPacket((Packet)packet); 398 remote_client.OutPacket((Packet)packet);
400 sequenceID++; 399 sequenceID++;
401 byteArray = new byte[PARCEL_BLOCKS_PER_PACKET]; 400 byteArray = new byte[PARCEL_BLOCKS_PER_PACKET];
@@ -483,6 +482,20 @@ namespace OpenSim.Region.Environment
483 addParcel(fullSimParcel); 482 addParcel(fullSimParcel);
484 483
485 } 484 }
485
486
487 public void handleSignificantClientMovement(IClientAPI remote_client)
488 {
489 Avatar clientAvatar = m_world.RequestAvatar(remote_client.AgentId);
490 if (clientAvatar != null)
491 {
492 Parcel over = getParcel(Convert.ToInt32(clientAvatar.Pos.X), Convert.ToInt32(clientAvatar.Pos.Y));
493 if (over != null)
494 {
495 over.sendParcelProperties(0, false, 0, remote_client); //TODO: correctly send the sequence ID!!!
496 }
497 }
498 }
486 #endregion 499 #endregion
487 } 500 }
488 #endregion 501 #endregion
@@ -638,7 +651,6 @@ namespace OpenSim.Region.Environment
638 parcelData.userLookAt = packet.ParcelData.UserLookAt; 651 parcelData.userLookAt = packet.ParcelData.UserLookAt;
639 652
640 List<Avatar> avatars = m_world.RequestAvatarList(); 653 List<Avatar> avatars = m_world.RequestAvatarList();
641
642 for (int i = 0; i < avatars.Count; i++) 654 for (int i = 0; i < avatars.Count; i++)
643 { 655 {
644 Parcel over = m_world.parcelManager.getParcel((int)Math.Round(avatars[i].Pos.X), (int)Math.Round(avatars[i].Pos.Y)); 656 Parcel over = m_world.parcelManager.getParcel((int)Math.Round(avatars[i].Pos.X), (int)Math.Round(avatars[i].Pos.Y));
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index d526b3c..4a4b7a0 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -492,7 +492,8 @@ namespace OpenSim.Region.Environment.Scenes
492 client.OnParcelJoinRequest += new ParcelJoinRequest(parcelManager.handleParcelJoinRequest); 492 client.OnParcelJoinRequest += new ParcelJoinRequest(parcelManager.handleParcelJoinRequest);
493 client.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(parcelManager.handleParcelPropertiesUpdateRequest); 493 client.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(parcelManager.handleParcelPropertiesUpdateRequest);
494 client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(estateManager.handleEstateOwnerMessage); 494 client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(estateManager.handleEstateOwnerMessage);
495 495
496
496 this.estateManager.sendRegionHandshake(client); 497 this.estateManager.sendRegionHandshake(client);
497 CreateAndAddScenePresence(client); 498 CreateAndAddScenePresence(client);
498 499
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 8134276..037b19d 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -40,6 +40,9 @@ namespace OpenSim.Region.Environment.Scenes
40{ 40{
41 public partial class ScenePresence : Entity 41 public partial class ScenePresence : Entity
42 { 42 {
43
44
45
43 public static bool PhysicsEngineFlying = false; 46 public static bool PhysicsEngineFlying = false;
44 public static AvatarAnimations Animations; 47 public static AvatarAnimations Animations;
45 public static byte[] DefaultTexture; 48 public static byte[] DefaultTexture;
@@ -75,7 +78,10 @@ namespace OpenSim.Region.Environment.Scenes
75 DIR_CONTROL_FLAG_UP = MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS, 78 DIR_CONTROL_FLAG_UP = MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS,
76 DIR_CONTROL_FLAG_DOWN = MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG 79 DIR_CONTROL_FLAG_DOWN = MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG
77 } 80 }
78 81 /// <summary>
82 /// Position at which a significant movement was made
83 /// </summary>
84 private LLVector3 posLastSignificantMove = new LLVector3();
79 #region Properties 85 #region Properties
80 /// <summary> 86 /// <summary>
81 /// 87 ///
@@ -359,7 +365,9 @@ namespace OpenSim.Region.Environment.Scenes
359 } 365 }
360 } 366 }
361 367
368 this.CheckForSignificantMovement();
362 this.CheckForBorderCrossing(); 369 this.CheckForBorderCrossing();
370
363 } 371 }
364 } 372 }
365 #endregion 373 #endregion
@@ -465,6 +473,18 @@ namespace OpenSim.Region.Environment.Scenes
465 } 473 }
466 #endregion 474 #endregion
467 475
476 #region Significant Movement Method
477
478 protected void CheckForSignificantMovement()
479 {
480 if (libsecondlife.Helpers.VecDist(this.Pos, this.posLastSignificantMove) > 2.0)
481 {
482 this.posLastSignificantMove = this.Pos;
483 this.m_world.parcelManager.handleSignificantClientMovement(this.ControllingClient);
484
485 }
486 }
487 #endregion
468 #region Border Crossing Methods 488 #region Border Crossing Methods
469 /// <summary> 489 /// <summary>
470 /// 490 ///