aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer/world/Avatar.Update.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/OpenSim.RegionServer/world/Avatar.Update.cs24
1 files changed, 23 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 {