diff options
author | mingchen | 2007-07-12 23:57:26 +0000 |
---|---|---|
committer | mingchen | 2007-07-12 23:57:26 +0000 |
commit | 486632986c33234924ba548609f623e590c46e2e (patch) | |
tree | 41b10aea89ebcc1acf2225203322be1fcdb39d15 /OpenSim/Region/Environment | |
parent | add Linux friendly prebuild script (diff) | |
download | opensim-SC-486632986c33234924ba548609f623e590c46e2e.zip opensim-SC-486632986c33234924ba548609f623e590c46e2e.tar.gz opensim-SC-486632986c33234924ba548609f623e590c46e2e.tar.bz2 opensim-SC-486632986c33234924ba548609f623e590c46e2e.tar.xz |
*Parcel updates are now sent to users over newly subdivided areas and users over parcels being joined to correctly update the viewers
*NOTE: Parcel updates are packets sent to the viewer when they enter a new parcel containing information such as parcel name, media URLS, etc
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/ParcelManager.cs | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/ParcelManager.cs b/OpenSim/Region/Environment/ParcelManager.cs index aca63a0..5e7ee18 100644 --- a/OpenSim/Region/Environment/ParcelManager.cs +++ b/OpenSim/Region/Environment/ParcelManager.cs | |||
@@ -123,7 +123,7 @@ namespace OpenSim.Region.Environment | |||
123 | /// Adds a parcel to the stored list and adds them to the parcelIDList to what they own | 123 | /// Adds a parcel to the stored list and adds them to the parcelIDList to what they own |
124 | /// </summary> | 124 | /// </summary> |
125 | /// <param name="new_parcel">The parcel being added</param> | 125 | /// <param name="new_parcel">The parcel being added</param> |
126 | public void addParcel(Parcel new_parcel) | 126 | public Parcel addParcel(Parcel new_parcel) |
127 | { | 127 | { |
128 | lastParcelLocalID++; | 128 | lastParcelLocalID++; |
129 | new_parcel.parcelData.localID = lastParcelLocalID; | 129 | new_parcel.parcelData.localID = lastParcelLocalID; |
@@ -144,6 +144,7 @@ namespace OpenSim.Region.Environment | |||
144 | } | 144 | } |
145 | parcelList[lastParcelLocalID].forceUpdateParcelInfo(); | 145 | parcelList[lastParcelLocalID].forceUpdateParcelInfo(); |
146 | 146 | ||
147 | return new_parcel; | ||
147 | 148 | ||
148 | } | 149 | } |
149 | /// <summary> | 150 | /// <summary> |
@@ -182,6 +183,7 @@ namespace OpenSim.Region.Environment | |||
182 | } | 183 | } |
183 | } | 184 | } |
184 | removeParcel(slave.parcelData.localID); | 185 | removeParcel(slave.parcelData.localID); |
186 | master.sendParcelUpdateToAvatarsOverMe(); | ||
185 | } | 187 | } |
186 | /// <summary> | 188 | /// <summary> |
187 | /// Get the parcel at the specified point | 189 | /// Get the parcel at the specified point |
@@ -260,10 +262,10 @@ namespace OpenSim.Region.Environment | |||
260 | parcelList[startParcelIndex].setParcelBitmap(Parcel.modifyParcelBitmapSquare(startParcel.getParcelBitmap(), start_x, start_y, end_x, end_y, false)); | 262 | parcelList[startParcelIndex].setParcelBitmap(Parcel.modifyParcelBitmapSquare(startParcel.getParcelBitmap(), start_x, start_y, end_x, end_y, false)); |
261 | parcelList[startParcelIndex].forceUpdateParcelInfo(); | 263 | parcelList[startParcelIndex].forceUpdateParcelInfo(); |
262 | 264 | ||
263 | |||
264 | //Now add the new parcel | 265 | //Now add the new parcel |
265 | addParcel(newParcel); | 266 | Parcel result = addParcel(newParcel); |
266 | 267 | ||
268 | result.sendParcelUpdateToAvatarsOverMe(); | ||
267 | 269 | ||
268 | 270 | ||
269 | 271 | ||
@@ -492,7 +494,7 @@ namespace OpenSim.Region.Environment | |||
492 | Parcel over = getParcel(Convert.ToInt32(clientAvatar.Pos.X), Convert.ToInt32(clientAvatar.Pos.Y)); | 494 | Parcel over = getParcel(Convert.ToInt32(clientAvatar.Pos.X), Convert.ToInt32(clientAvatar.Pos.Y)); |
493 | if (over != null) | 495 | if (over != null) |
494 | { | 496 | { |
495 | over.sendParcelProperties(0, false, 0, remote_client); //TODO: correctly send the sequence ID!!! | 497 | over.sendParcelProperties(0, false, 0, remote_client); |
496 | } | 498 | } |
497 | } | 499 | } |
498 | } | 500 | } |
@@ -649,17 +651,22 @@ namespace OpenSim.Region.Environment | |||
649 | parcelData.snapshotID = packet.ParcelData.SnapshotID; | 651 | parcelData.snapshotID = packet.ParcelData.SnapshotID; |
650 | parcelData.userLocation = packet.ParcelData.UserLocation; | 652 | parcelData.userLocation = packet.ParcelData.UserLocation; |
651 | parcelData.userLookAt = packet.ParcelData.UserLookAt; | 653 | parcelData.userLookAt = packet.ParcelData.UserLookAt; |
654 | sendParcelUpdateToAvatarsOverMe(); | ||
655 | |||
652 | 656 | ||
653 | List<Avatar> avatars = m_world.RequestAvatarList(); | 657 | } |
654 | for (int i = 0; i < avatars.Count; i++) | 658 | } |
659 | |||
660 | public void sendParcelUpdateToAvatarsOverMe() | ||
661 | { | ||
662 | List<Avatar> avatars = m_world.RequestAvatarList(); | ||
663 | for (int i = 0; i < avatars.Count; i++) | ||
664 | { | ||
665 | Parcel over = m_world.parcelManager.getParcel((int)Math.Round(avatars[i].Pos.X), (int)Math.Round(avatars[i].Pos.Y)); | ||
666 | if (over.parcelData.localID == this.parcelData.localID) | ||
655 | { | 667 | { |
656 | Parcel over = m_world.parcelManager.getParcel((int)Math.Round(avatars[i].Pos.X), (int)Math.Round(avatars[i].Pos.Y)); | 668 | sendParcelProperties(0, false, 0, avatars[i].ControllingClient); |
657 | if (over == this) | ||
658 | { | ||
659 | sendParcelProperties(0, false, 0, avatars[i].ControllingClient); | ||
660 | } | ||
661 | } | 669 | } |
662 | |||
663 | } | 670 | } |
664 | } | 671 | } |
665 | #endregion | 672 | #endregion |