diff options
Diffstat (limited to 'OpenSim.RegionServer/world/Primitive2.cs')
-rw-r--r-- | OpenSim.RegionServer/world/Primitive2.cs | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/OpenSim.RegionServer/world/Primitive2.cs b/OpenSim.RegionServer/world/Primitive2.cs index 3b39456..6d071d4 100644 --- a/OpenSim.RegionServer/world/Primitive2.cs +++ b/OpenSim.RegionServer/world/Primitive2.cs | |||
@@ -16,7 +16,7 @@ namespace OpenSim.world | |||
16 | protected PrimData primData; | 16 | protected PrimData primData; |
17 | //private ObjectUpdatePacket OurPacket; | 17 | //private ObjectUpdatePacket OurPacket; |
18 | private LLVector3 positionLastFrame = new LLVector3(0, 0, 0); | 18 | private LLVector3 positionLastFrame = new LLVector3(0, 0, 0); |
19 | private Dictionary<uint, SimClient> m_clientThreads; | 19 | private Dictionary<uint, ClientView> m_clientThreads; |
20 | private ulong m_regionHandle; | 20 | private ulong m_regionHandle; |
21 | private const uint FULL_MASK_PERMISSIONS = 2147483647; | 21 | private const uint FULL_MASK_PERMISSIONS = 2147483647; |
22 | private bool physicsEnabled = false; | 22 | private bool physicsEnabled = false; |
@@ -58,7 +58,7 @@ namespace OpenSim.world | |||
58 | } | 58 | } |
59 | #endregion | 59 | #endregion |
60 | 60 | ||
61 | public Primitive2(Dictionary<uint, SimClient> clientThreads, ulong regionHandle, World world) | 61 | public Primitive2(Dictionary<uint, ClientView> clientThreads, ulong regionHandle, World world) |
62 | { | 62 | { |
63 | m_clientThreads = clientThreads; | 63 | m_clientThreads = clientThreads; |
64 | m_regionHandle = regionHandle; | 64 | m_regionHandle = regionHandle; |
@@ -66,6 +66,17 @@ namespace OpenSim.world | |||
66 | inventoryItems = new Dictionary<LLUUID, InventoryItem>(); | 66 | inventoryItems = new Dictionary<LLUUID, InventoryItem>(); |
67 | } | 67 | } |
68 | 68 | ||
69 | public Primitive2(Dictionary<uint, ClientView> clientThreads, ulong regionHandle, World world, LLUUID owner) | ||
70 | { | ||
71 | m_clientThreads = clientThreads; | ||
72 | m_regionHandle = regionHandle; | ||
73 | m_world = world; | ||
74 | inventoryItems = new Dictionary<LLUUID, InventoryItem>(); | ||
75 | this.primData = new PrimData(); | ||
76 | this.primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; | ||
77 | this.primData.OwnerID = owner; | ||
78 | } | ||
79 | |||
69 | public byte[] GetByteArray() | 80 | public byte[] GetByteArray() |
70 | { | 81 | { |
71 | byte[] result = null; | 82 | byte[] result = null; |
@@ -159,7 +170,7 @@ namespace OpenSim.world | |||
159 | 170 | ||
160 | } | 171 | } |
161 | 172 | ||
162 | public void GetProperites(SimClient client) | 173 | public void GetProperites(ClientView client) |
163 | { | 174 | { |
164 | ObjectPropertiesPacket proper = new ObjectPropertiesPacket(); | 175 | ObjectPropertiesPacket proper = new ObjectPropertiesPacket(); |
165 | proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1]; | 176 | proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1]; |
@@ -202,12 +213,12 @@ namespace OpenSim.world | |||
202 | return null; | 213 | return null; |
203 | } | 214 | } |
204 | 215 | ||
205 | public void RequestInventoryInfo(SimClient simClient, RequestTaskInventoryPacket packet) | 216 | public void RequestInventoryInfo(ClientView simClient, RequestTaskInventoryPacket packet) |
206 | { | 217 | { |
207 | 218 | ||
208 | } | 219 | } |
209 | 220 | ||
210 | public void RequestXferInventory(SimClient simClient, ulong xferID) | 221 | public void RequestXferInventory(ClientView simClient, ulong xferID) |
211 | { | 222 | { |
212 | //will only currently work if the total size of the inventory data array is under about 1000 bytes | 223 | //will only currently work if the total size of the inventory data array is under about 1000 bytes |
213 | SendXferPacketPacket send = new SendXferPacketPacket(); | 224 | SendXferPacketPacket send = new SendXferPacketPacket(); |
@@ -246,7 +257,7 @@ namespace OpenSim.world | |||
246 | #region Update viewers Methods | 257 | #region Update viewers Methods |
247 | 258 | ||
248 | //should change these mehtods, so that outgoing packets are sent through the avatar class | 259 | //should change these mehtods, so that outgoing packets are sent through the avatar class |
249 | public void SendFullUpdateToClient(SimClient remoteClient) | 260 | public void SendFullUpdateToClient(ClientView remoteClient) |
250 | { | 261 | { |
251 | LLVector3 lPos; | 262 | LLVector3 lPos; |
252 | if (this._physActor != null && this.physicsEnabled) | 263 | if (this._physActor != null && this.physicsEnabled) |
@@ -273,7 +284,7 @@ namespace OpenSim.world | |||
273 | 284 | ||
274 | } | 285 | } |
275 | 286 | ||
276 | public void SendTerseUpdateToClient(SimClient RemoteClient) | 287 | public void SendTerseUpdateToClient(ClientView RemoteClient) |
277 | { | 288 | { |
278 | 289 | ||
279 | } | 290 | } |
@@ -316,7 +327,7 @@ namespace OpenSim.world | |||
316 | PData.PathTwist = addPacket.ObjectData.PathTwist; | 327 | PData.PathTwist = addPacket.ObjectData.PathTwist; |
317 | PData.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; | 328 | PData.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; |
318 | LLVector3 pos1 = addPacket.ObjectData.RayEnd; | 329 | LLVector3 pos1 = addPacket.ObjectData.RayEnd; |
319 | this.primData.FullID = this.uuid = LLUUID.Random(); | 330 | this.primData.FullID = this.uuid = LLUUID.Random(); |
320 | this.localid = (uint)(localID); | 331 | this.localid = (uint)(localID); |
321 | this.primData.Position = this.Pos = pos1; | 332 | this.primData.Position = this.Pos = pos1; |
322 | } | 333 | } |