aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer/world/Avatar.Update.cs
diff options
context:
space:
mode:
authormingchen2007-06-07 01:04:07 +0000
committermingchen2007-06-07 01:04:07 +0000
commitf1250bd291dc3fbcf375d792691a455f45727224 (patch)
treef21a9a2d63a9c2f66ded8459e47bfacd9732bd58 /OpenSim/OpenSim.RegionServer/world/Avatar.Update.cs
parent*Added support to change most of a parcel's settings and flags (from the abou... (diff)
downloadopensim-SC_OLD-f1250bd291dc3fbcf375d792691a455f45727224.zip
opensim-SC_OLD-f1250bd291dc3fbcf375d792691a455f45727224.tar.gz
opensim-SC_OLD-f1250bd291dc3fbcf375d792691a455f45727224.tar.bz2
opensim-SC_OLD-f1250bd291dc3fbcf375d792691a455f45727224.tar.xz
*When avatar crosses parcel, it updates successfully in the viewer
*This includes parcel name in title bar, media and music autoplay, and parcel flag icons *Yay!
Diffstat (limited to 'OpenSim/OpenSim.RegionServer/world/Avatar.Update.cs')
-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 {