diff options
author | lbsa71 | 2007-07-26 14:55:42 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-26 14:55:42 +0000 |
commit | 39b64564dca0e5cb57a2a8e1b60979ccaaf11ef6 (patch) | |
tree | 81ab89a9749577c6fa1a3a19c1ed09c1942ec201 /OpenSim/Region/ClientStack | |
parent | Added the default shape to the OpenSim library. Now need to get the new ruth ... (diff) | |
download | opensim-SC-39b64564dca0e5cb57a2a8e1b60979ccaaf11ef6.zip opensim-SC-39b64564dca0e5cb57a2a8e1b60979ccaaf11ef6.tar.gz opensim-SC-39b64564dca0e5cb57a2a8e1b60979ccaaf11ef6.tar.bz2 opensim-SC-39b64564dca0e5cb57a2a8e1b60979ccaaf11ef6.tar.xz |
* Started renaming world to Scene
* Update and UpdateMovement now first stores array to avoid collection update exceptions
* Ignored some bins
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.API.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | 32 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/PacketServer.cs | 22 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/RegionApplicationBase.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/UDPServer.cs | 8 |
6 files changed, 20 insertions, 58 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index 0da89a1..feacadc 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs | |||
@@ -146,7 +146,7 @@ namespace OpenSim.Region.ClientStack | |||
146 | } | 146 | } |
147 | } | 147 | } |
148 | 148 | ||
149 | #region World/Avatar to Client | 149 | #region Scene/Avatar to Client |
150 | 150 | ||
151 | /// <summary> | 151 | /// <summary> |
152 | /// | 152 | /// |
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index e5e872a..c0c14ee 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | |||
@@ -73,7 +73,7 @@ namespace OpenSim.Region.ClientStack | |||
73 | } | 73 | } |
74 | break; | 74 | break; |
75 | 75 | ||
76 | #region World/Avatar | 76 | #region Scene/Avatar |
77 | case PacketType.ChatFromViewer: | 77 | case PacketType.ChatFromViewer: |
78 | ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack; | 78 | ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack; |
79 | if (Util.FieldToString(inchatpack.ChatData.Message) == "") | 79 | if (Util.FieldToString(inchatpack.ChatData.Message) == "") |
@@ -466,33 +466,7 @@ namespace OpenSim.Region.ClientStack | |||
466 | // Console.WriteLine(Pack.ToString()); | 466 | // Console.WriteLine(Pack.ToString()); |
467 | UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack; | 467 | UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack; |
468 | AgentInventory myinventory = this.m_inventoryCache.GetAgentsInventory(this.AgentID); | 468 | AgentInventory myinventory = this.m_inventoryCache.GetAgentsInventory(this.AgentID); |
469 | /*if (myinventory != null) | 469 | |
470 | { | ||
471 | if (updatetask.UpdateData.Key == 0) | ||
472 | { | ||
473 | if (myinventory.InventoryItems[updatetask.InventoryData.ItemID] != null) | ||
474 | { | ||
475 | if (myinventory.InventoryItems[updatetask.InventoryData.ItemID].Type == 7) | ||
476 | { | ||
477 | LLUUID noteaid = myinventory.InventoryItems[updatetask.InventoryData.ItemID].AssetID; | ||
478 | AssetBase assBase = this.m_assetCache.GetAsset(noteaid); | ||
479 | if (assBase != null) | ||
480 | { | ||
481 | foreach (Entity ent in m_world.Entities.Values) | ||
482 | { | ||
483 | if (ent.localid == updatetask.UpdateData.LocalID) | ||
484 | { | ||
485 | if (ent is OpenSim.world.Primitive) | ||
486 | { | ||
487 | this.m_world.AddScript(ent, Util.FieldToString(assBase.Data)); | ||
488 | } | ||
489 | } | ||
490 | } | ||
491 | } | ||
492 | } | ||
493 | } | ||
494 | } | ||
495 | }*/ | ||
496 | break; | 470 | break; |
497 | case PacketType.MapLayerRequest: | 471 | case PacketType.MapLayerRequest: |
498 | this.RequestMapLayer(); | 472 | this.RequestMapLayer(); |
@@ -524,7 +498,7 @@ namespace OpenSim.Region.ClientStack | |||
524 | { | 498 | { |
525 | AssetLandmark lm = new AssetLandmark(lma); | 499 | AssetLandmark lm = new AssetLandmark(lma); |
526 | 500 | ||
527 | if (lm.RegionID == m_world.RegionInfo.SimUUID) | 501 | if (lm.RegionID == m_scene.RegionInfo.SimUUID) |
528 | { | 502 | { |
529 | TeleportLocalPacket tpLocal = new TeleportLocalPacket(); | 503 | TeleportLocalPacket tpLocal = new TeleportLocalPacket(); |
530 | 504 | ||
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 3fd3a46..92d73e1 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSim.Region.ClientStack | |||
72 | private AgentAssetUpload UploadAssets; | 72 | private AgentAssetUpload UploadAssets; |
73 | private LLUUID newAssetFolder = LLUUID.Zero; | 73 | private LLUUID newAssetFolder = LLUUID.Zero; |
74 | private bool debug = false; | 74 | private bool debug = false; |
75 | protected IWorld m_world; | 75 | protected IScene m_scene; |
76 | private Dictionary<uint, ClientView> m_clientThreads; | 76 | private Dictionary<uint, ClientView> m_clientThreads; |
77 | private AssetCache m_assetCache; | 77 | private AssetCache m_assetCache; |
78 | private InventoryCache m_inventoryCache; | 78 | private InventoryCache m_inventoryCache; |
@@ -85,9 +85,9 @@ namespace OpenSim.Region.ClientStack | |||
85 | private int probesWithNoIngressPackets = 0; | 85 | private int probesWithNoIngressPackets = 0; |
86 | private int lastPacketsReceived = 0; | 86 | private int lastPacketsReceived = 0; |
87 | 87 | ||
88 | public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AgentCircuitManager authenSessions ) | 88 | public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IScene scene, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AgentCircuitManager authenSessions ) |
89 | { | 89 | { |
90 | m_world = world; | 90 | m_scene = scene; |
91 | m_clientThreads = clientThreads; | 91 | m_clientThreads = clientThreads; |
92 | m_assetCache = assetCache; | 92 | m_assetCache = assetCache; |
93 | 93 | ||
@@ -121,7 +121,7 @@ namespace OpenSim.Region.ClientStack | |||
121 | { | 121 | { |
122 | clientPingTimer.Stop(); | 122 | clientPingTimer.Stop(); |
123 | this.m_inventoryCache.ClientLeaving(this.AgentID, null); | 123 | this.m_inventoryCache.ClientLeaving(this.AgentID, null); |
124 | m_world.RemoveClient(this.AgentId); | 124 | m_scene.RemoveClient(this.AgentId); |
125 | 125 | ||
126 | m_clientThreads.Remove(this.CircuitCode); | 126 | m_clientThreads.Remove(this.CircuitCode); |
127 | m_networkServer.RemoveClientCircuit(this.CircuitCode); | 127 | m_networkServer.RemoveClientCircuit(this.CircuitCode); |
@@ -231,8 +231,8 @@ namespace OpenSim.Region.ClientStack | |||
231 | clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity); | 231 | clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity); |
232 | clientPingTimer.Enabled = true; | 232 | clientPingTimer.Enabled = true; |
233 | 233 | ||
234 | MainLog.Instance.Verbose( "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); | 234 | MainLog.Instance.Verbose( "OpenSimClient.cs:InitNewClient() - Adding viewer agent to scene"); |
235 | this.m_world.AddNewClient(this, false); | 235 | this.m_scene.AddNewClient(this, false); |
236 | } | 236 | } |
237 | 237 | ||
238 | protected virtual void AuthUser() | 238 | protected virtual void AuthUser() |
diff --git a/OpenSim/Region/ClientStack/PacketServer.cs b/OpenSim/Region/ClientStack/PacketServer.cs index 596cdbe..9d2250e 100644 --- a/OpenSim/Region/ClientStack/PacketServer.cs +++ b/OpenSim/Region/ClientStack/PacketServer.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.ClientStack | |||
40 | public class PacketServer | 40 | public class PacketServer |
41 | { | 41 | { |
42 | private ClientStackNetworkHandler _networkHandler; | 42 | private ClientStackNetworkHandler _networkHandler; |
43 | private IWorld _localWorld; | 43 | private IScene _localScene; |
44 | public Dictionary<uint, ClientView> ClientThreads = new Dictionary<uint, ClientView>(); | 44 | public Dictionary<uint, ClientView> ClientThreads = new Dictionary<uint, ClientView>(); |
45 | private ClientManager m_clientManager = new ClientManager(); | 45 | private ClientManager m_clientManager = new ClientManager(); |
46 | public ClientManager ClientManager | 46 | public ClientManager ClientManager |
@@ -54,11 +54,11 @@ namespace OpenSim.Region.ClientStack | |||
54 | _networkHandler.RegisterPacketServer(this); | 54 | _networkHandler.RegisterPacketServer(this); |
55 | } | 55 | } |
56 | 56 | ||
57 | public IWorld LocalWorld | 57 | public IScene LocalScene |
58 | { | 58 | { |
59 | set | 59 | set |
60 | { | 60 | { |
61 | this._localWorld = value; | 61 | this._localScene = value; |
62 | } | 62 | } |
63 | } | 63 | } |
64 | 64 | ||
@@ -122,19 +122,7 @@ namespace OpenSim.Region.ClientStack | |||
122 | 122 | ||
123 | } | 123 | } |
124 | 124 | ||
125 | /// <summary> | 125 | protected virtual ClientView CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IScene world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AgentCircuitManager authenSessions) |
126 | /// | ||
127 | /// </summary> | ||
128 | /// <param name="remoteEP"></param> | ||
129 | /// <param name="initialcirpack"></param> | ||
130 | /// <param name="clientThreads"></param> | ||
131 | /// <param name="world"></param> | ||
132 | /// <param name="assetCache"></param> | ||
133 | /// <param name="packServer"></param> | ||
134 | /// <param name="inventoryCache"></param> | ||
135 | /// <param name="authenSessions"></param> | ||
136 | /// <returns></returns> | ||
137 | protected virtual ClientView CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AgentCircuitManager authenSessions) | ||
138 | { | 126 | { |
139 | return new ClientView(remoteEP, initialcirpack, clientThreads, world, assetCache, packServer, inventoryCache, authenSessions ); | 127 | return new ClientView(remoteEP, initialcirpack, clientThreads, world, assetCache, packServer, inventoryCache, authenSessions ); |
140 | } | 128 | } |
@@ -151,7 +139,7 @@ namespace OpenSim.Region.ClientStack | |||
151 | public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, InventoryCache inventoryCache, AgentCircuitManager authenticateSessionsClass) | 139 | public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, InventoryCache inventoryCache, AgentCircuitManager authenticateSessionsClass) |
152 | { | 140 | { |
153 | ClientView newuser = | 141 | ClientView newuser = |
154 | CreateNewClient(epSender, useCircuit, ClientThreads, _localWorld, assetCache, this, inventoryCache, | 142 | CreateNewClient(epSender, useCircuit, ClientThreads, _localScene, assetCache, this, inventoryCache, |
155 | authenticateSessionsClass); | 143 | authenticateSessionsClass); |
156 | 144 | ||
157 | this.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser); | 145 | this.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser); |
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index d91cd95..a61b9e3 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -108,7 +108,7 @@ namespace OpenSim.Region.ClientStack | |||
108 | StorageManager storageManager = CreateStorageManager(regionInfo); | 108 | StorageManager storageManager = CreateStorageManager(regionInfo); |
109 | Scene scene = CreateScene(regionInfo, storageManager, authen); | 109 | Scene scene = CreateScene(regionInfo, storageManager, authen); |
110 | 110 | ||
111 | udpServer.LocalWorld = scene; | 111 | udpServer.LocalScene = scene; |
112 | 112 | ||
113 | scene.LoadWorldMap(); | 113 | scene.LoadWorldMap(); |
114 | 114 | ||
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs index 340ef61..705ced0 100644 --- a/OpenSim/Region/ClientStack/UDPServer.cs +++ b/OpenSim/Region/ClientStack/UDPServer.cs | |||
@@ -53,7 +53,7 @@ namespace OpenSim.Region.ClientStack | |||
53 | protected PacketServer _packetServer; | 53 | protected PacketServer _packetServer; |
54 | 54 | ||
55 | protected int listenPort; | 55 | protected int listenPort; |
56 | protected IWorld m_localWorld; | 56 | protected IScene m_localScene; |
57 | protected AssetCache m_assetCache; | 57 | protected AssetCache m_assetCache; |
58 | protected InventoryCache m_inventoryCache; | 58 | protected InventoryCache m_inventoryCache; |
59 | protected LogBase m_log; | 59 | protected LogBase m_log; |
@@ -71,12 +71,12 @@ namespace OpenSim.Region.ClientStack | |||
71 | } | 71 | } |
72 | } | 72 | } |
73 | 73 | ||
74 | public IWorld LocalWorld | 74 | public IScene LocalScene |
75 | { | 75 | { |
76 | set | 76 | set |
77 | { | 77 | { |
78 | this.m_localWorld = value; | 78 | this.m_localScene = value; |
79 | this._packetServer.LocalWorld = this.m_localWorld; | 79 | this._packetServer.LocalScene = this.m_localScene; |
80 | } | 80 | } |
81 | } | 81 | } |
82 | 82 | ||