diff options
author | mingchen | 2007-06-03 16:02:08 +0000 |
---|---|---|
committer | mingchen | 2007-06-03 16:02:08 +0000 |
commit | f22e27498e5e7fa2c0eee1e45a89dd0e107e57f9 (patch) | |
tree | 96503cce2b80bc70d9f3fccfd8a0a4249fc486bb /OpenSim/OpenSim.RegionServer/world | |
parent | * Fixing world map generation issues (thankyou LL for using different coordin... (diff) | |
download | opensim-SC-f22e27498e5e7fa2c0eee1e45a89dd0e107e57f9.zip opensim-SC-f22e27498e5e7fa2c0eee1e45a89dd0e107e57f9.tar.gz opensim-SC-f22e27498e5e7fa2c0eee1e45a89dd0e107e57f9.tar.bz2 opensim-SC-f22e27498e5e7fa2c0eee1e45a89dd0e107e57f9.tar.xz |
Added Basic Parcel Support
*Created Parcel class to handle each parcel
*Created ParcelManager class to handle the Parcel Object
*For now, by default it is assigned to a fake avatar key and set for sale to L$0
Diffstat (limited to '')
-rw-r--r-- | OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs | 24 | ||||
-rw-r--r-- | OpenSim/OpenSim.RegionServer/world/World.cs | 8 |
2 files changed, 32 insertions, 0 deletions
diff --git a/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs b/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs index 4f32335..74b8e9d 100644 --- a/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs +++ b/OpenSim/OpenSim.RegionServer/world/World.PacketHandlers.cs | |||
@@ -292,6 +292,30 @@ namespace OpenSim.world | |||
292 | } | 292 | } |
293 | } | 293 | } |
294 | } | 294 | } |
295 | #region Parcel Packet Handlers | ||
296 | void ParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, ClientView remote_client) | ||
297 | { | ||
298 | //Get the parcels within the bounds | ||
299 | List<Parcel> temp = new List<Parcel>(); | ||
300 | int x, y; | ||
301 | int inc_x = end_x - start_x; | ||
302 | int inc_y = end_y - start_y; | ||
303 | for(x = 0; x < inc_x; x++) | ||
304 | { | ||
305 | for(y = 0; y < inc_y; y++) | ||
306 | { | ||
307 | Parcel currentParcel = parcelManager.getParcel(start_x + x,start_y + y); | ||
308 | if(!temp.Contains(currentParcel)) | ||
309 | { | ||
310 | temp.Add(currentParcel); | ||
311 | currentParcel.sendParcelProperties(sequence_id,snap_selection,remote_client); | ||
312 | } | ||
313 | } | ||
314 | } | ||
315 | |||
316 | parcelManager.sendParcelOverlay(remote_client); | ||
317 | } | ||
318 | #endregion | ||
295 | 319 | ||
296 | /* | 320 | /* |
297 | public void RequestMapBlock(ClientView simClient, int minX, int minY, int maxX, int maxY) | 321 | public void RequestMapBlock(ClientView simClient, int minX, int minY, int maxX, int maxY) |
diff --git a/OpenSim/OpenSim.RegionServer/world/World.cs b/OpenSim/OpenSim.RegionServer/world/World.cs index ad1ce30..d2a13ca 100644 --- a/OpenSim/OpenSim.RegionServer/world/World.cs +++ b/OpenSim/OpenSim.RegionServer/world/World.cs | |||
@@ -35,6 +35,7 @@ namespace OpenSim.world | |||
35 | private Dictionary<string, ScriptFactory> m_scripts; | 35 | private Dictionary<string, ScriptFactory> m_scripts; |
36 | private Mutex updateLock; | 36 | private Mutex updateLock; |
37 | public string m_datastore; | 37 | public string m_datastore; |
38 | public ParcelManager parcelManager; | ||
38 | 39 | ||
39 | #region Properties | 40 | #region Properties |
40 | public PhysicsScene PhysScene | 41 | public PhysicsScene PhysScene |
@@ -85,6 +86,8 @@ namespace OpenSim.world | |||
85 | Avatar.LoadAnims(); | 86 | Avatar.LoadAnims(); |
86 | this.SetDefaultScripts(); | 87 | this.SetDefaultScripts(); |
87 | this.LoadScriptEngines(); | 88 | this.LoadScriptEngines(); |
89 | parcelManager = new ParcelManager(this); | ||
90 | |||
88 | } | 91 | } |
89 | catch (Exception e) | 92 | catch (Exception e) |
90 | { | 93 | { |
@@ -564,6 +567,7 @@ namespace OpenSim.world | |||
564 | agentClient.OnLinkObjects += new LinkObjects(this.LinkObjects); | 567 | agentClient.OnLinkObjects += new LinkObjects(this.LinkObjects); |
565 | agentClient.OnAddPrim += new ClientView.GenericCall4(this.AddNewPrim); | 568 | agentClient.OnAddPrim += new ClientView.GenericCall4(this.AddNewPrim); |
566 | agentClient.OnUpdatePrimShape += new ClientView.UpdateShape(this.UpdatePrimShape); | 569 | agentClient.OnUpdatePrimShape += new ClientView.UpdateShape(this.UpdatePrimShape); |
570 | |||
567 | agentClient.OnObjectSelect += new ClientView.ObjectSelect(this.SelectPrim); | 571 | agentClient.OnObjectSelect += new ClientView.ObjectSelect(this.SelectPrim); |
568 | agentClient.OnUpdatePrimFlags += new ClientView.UpdatePrimFlags(this.UpdatePrimFlags); | 572 | agentClient.OnUpdatePrimFlags += new ClientView.UpdatePrimFlags(this.UpdatePrimFlags); |
569 | agentClient.OnUpdatePrimTexture += new ClientView.UpdatePrimTexture(this.UpdatePrimTexture); | 573 | agentClient.OnUpdatePrimTexture += new ClientView.UpdatePrimTexture(this.UpdatePrimTexture); |
@@ -571,6 +575,8 @@ namespace OpenSim.world | |||
571 | agentClient.OnUpdatePrimRotation += new ClientView.UpdatePrimRotation(this.UpdatePrimRotation); | 575 | agentClient.OnUpdatePrimRotation += new ClientView.UpdatePrimRotation(this.UpdatePrimRotation); |
572 | agentClient.OnUpdatePrimScale += new ClientView.UpdatePrimVector(this.UpdatePrimScale); | 576 | agentClient.OnUpdatePrimScale += new ClientView.UpdatePrimVector(this.UpdatePrimScale); |
573 | agentClient.OnDeRezObject += new ClientView.GenericCall4(this.DeRezObject); | 577 | agentClient.OnDeRezObject += new ClientView.GenericCall4(this.DeRezObject); |
578 | |||
579 | agentClient.OnParcelPropertiesRequest += new ParcelPropertiesRequest(ParcelPropertiesRequest); | ||
574 | Avatar newAvatar = null; | 580 | Avatar newAvatar = null; |
575 | try | 581 | try |
576 | { | 582 | { |
@@ -618,6 +624,8 @@ namespace OpenSim.world | |||
618 | return newAvatar; | 624 | return newAvatar; |
619 | } | 625 | } |
620 | 626 | ||
627 | |||
628 | |||
621 | public override void RemoveViewerAgent(ClientView agentClient) | 629 | public override void RemoveViewerAgent(ClientView agentClient) |
622 | { | 630 | { |
623 | try | 631 | try |