aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.RegionServer')
-rw-r--r--OpenSim/OpenSim.RegionServer/world/Avatar.Update.cs24
-rw-r--r--OpenSim/OpenSim.RegionServer/world/Avatar.cs7
2 files changed, 30 insertions, 1 deletions
diff --git a/OpenSim/OpenSim.RegionServer/world/Avatar.Update.cs b/OpenSim/OpenSim.RegionServer/world/Avatar.Update.cs
index 29e0a15..7712905 100644
--- a/OpenSim/OpenSim.RegionServer/world/Avatar.Update.cs
+++ b/OpenSim/OpenSim.RegionServer/world/Avatar.Update.cs
@@ -96,7 +96,29 @@ namespace OpenSim.world
96 } 96 }
97 97
98 } 98 }
99 this.positionLastFrame = pos2; 99
100 if (positionFrameBeforeLast != pos2)
101 {
102 this.positionFrameBeforeLast = this.positionLastFrame;
103 this.positionLastFrame = pos2;
104 int tempRoundedX = (int)Math.Round(positionLastFrame.X);
105 int tempRoundedY = (int)Math.Round(positionLastFrame.Y);
106 if (this.positionRoundedX != tempRoundedX || this.positionRoundedY != tempRoundedY)
107 {
108
109 this.positionRoundedX = tempRoundedX;
110 this.positionRoundedY = tempRoundedY;
111 int currentParcelLocalID = m_world.parcelManager.getParcel(tempRoundedX, tempRoundedY).parcelData.localID;
112 if(currentParcelLocalID != this.positionParcelHoverLocalID)
113 {
114
115 Console.WriteLine("NEW PARCEL: " + m_world.parcelManager.getParcel(tempRoundedX, tempRoundedY).parcelData.parcelName);
116 m_world.parcelManager.getParcel(tempRoundedX, tempRoundedY).sendParcelProperties(this.parcelUpdateSequenceIncrement, false, 0,this.ControllingClient);
117 this.positionParcelHoverLocalID = currentParcelLocalID;
118 this.parcelUpdateSequenceIncrement++;
119 }
120 }
121 }
100 122
101 if (!this.ControllingClient.m_sandboxMode) 123 if (!this.ControllingClient.m_sandboxMode)
102 { 124 {
diff --git a/OpenSim/OpenSim.RegionServer/world/Avatar.cs b/OpenSim/OpenSim.RegionServer/world/Avatar.cs
index 4b921f0..30999fc 100644
--- a/OpenSim/OpenSim.RegionServer/world/Avatar.cs
+++ b/OpenSim/OpenSim.RegionServer/world/Avatar.cs
@@ -57,6 +57,13 @@ namespace OpenSim.world
57 private byte[] visualParams; 57 private byte[] visualParams;
58 private AvatarWearable[] Wearables; 58 private AvatarWearable[] Wearables;
59 private LLVector3 positionLastFrame = new LLVector3(0, 0, 0); 59 private LLVector3 positionLastFrame = new LLVector3(0, 0, 0);
60 private LLVector3 positionFrameBeforeLast = new LLVector3(0, 0, 0);
61
62 private int positionRoundedX = 0;
63 private int positionRoundedY = 0;
64
65 private int positionParcelHoverLocalID = -1; //Local ID of the last parcel they were over
66 private int parcelUpdateSequenceIncrement = 1;
60 private ulong m_regionHandle; 67 private ulong m_regionHandle;
61 //private Dictionary<uint, ClientView> m_clientThreads; 68 //private Dictionary<uint, ClientView> m_clientThreads;
62 private string m_regionName; 69 private string m_regionName;