diff options
author | Adam Frisby | 2007-03-24 16:06:43 +0000 |
---|---|---|
committer | Adam Frisby | 2007-03-24 16:06:43 +0000 |
commit | 47c682075c874f7a01970d3557528722b89a6ffd (patch) | |
tree | 14b84cfbb5c0cba183bc97eb305c9109dd4b652d | |
parent | * Removed old prebuild prebuild file (diff) | |
download | opensim-SC-47c682075c874f7a01970d3557528722b89a6ffd.zip opensim-SC-47c682075c874f7a01970d3557528722b89a6ffd.tar.gz opensim-SC-47c682075c874f7a01970d3557528722b89a6ffd.tar.bz2 opensim-SC-47c682075c874f7a01970d3557528722b89a6ffd.tar.xz |
Applying Randomskk's patches
-rw-r--r-- | OpenSim.RegionServer/SimClient.cs | 4 | ||||
-rw-r--r-- | OpenSim.RegionServer/world/World.cs | 44 |
2 files changed, 47 insertions, 1 deletions
diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index b62d018..d271ea9 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs | |||
@@ -307,6 +307,10 @@ namespace OpenSim | |||
307 | FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack; | 307 | FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack; |
308 | OpenSimRoot.Instance.InventoryCache.FetchInventoryDescendents(this, Fetch); | 308 | OpenSimRoot.Instance.InventoryCache.FetchInventoryDescendents(this, Fetch); |
309 | break; | 309 | break; |
310 | case PacketType.DeRezObject: | ||
311 | //OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Received DeRezObject packet"); | ||
312 | OpenSimRoot.Instance.LocalWorld.DeRezObject((DeRezObjectPacket)Pack, this); | ||
313 | break; | ||
310 | } | 314 | } |
311 | } | 315 | } |
312 | 316 | ||
diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs index c653515..80e63b3 100644 --- a/OpenSim.RegionServer/world/World.cs +++ b/OpenSim.RegionServer/world/World.cs | |||
@@ -198,7 +198,49 @@ namespace OpenSim.world | |||
198 | //prim.PhysicsEnabled = true; | 198 | //prim.PhysicsEnabled = true; |
199 | this.Entities.Add(prim.uuid, prim); | 199 | this.Entities.Add(prim.uuid, prim); |
200 | this._primCount++; | 200 | this._primCount++; |
201 | } | 201 | } |
202 | |||
203 | public void DeRezObject(DeRezObjectPacket DeRezPacket, SimClient AgentClient) | ||
204 | { | ||
205 | //Needs to delete object from physics at a later date | ||
206 | |||
207 | libsecondlife.LLUUID [] DeRezEnts; | ||
208 | DeRezEnts = new libsecondlife.LLUUID[ DeRezPacket.ObjectData.Length ]; | ||
209 | int i = 0; | ||
210 | foreach( DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData ) | ||
211 | { | ||
212 | //OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LocalID:" + Data.ObjectLocalID.ToString()); | ||
213 | foreach (Entity ent in OpenSimRoot.Instance.LocalWorld.Entities.Values) | ||
214 | { | ||
215 | if (ent.localid == Data.ObjectLocalID) | ||
216 | { | ||
217 | DeRezEnts[i++] = ent.uuid; | ||
218 | this.localStorage.RemovePrim(ent.uuid); | ||
219 | KillObjectPacket kill = new KillObjectPacket(); | ||
220 | kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1]; | ||
221 | kill.ObjectData[0] = new KillObjectPacket.ObjectDataBlock(); | ||
222 | kill.ObjectData[0].ID = ent.localid; | ||
223 | foreach (SimClient client in OpenSimRoot.Instance.ClientThreads.Values) | ||
224 | { | ||
225 | client.OutPacket(kill); | ||
226 | } | ||
227 | //Uncommenting this means an old UUID will be re-used, thus crashing the asset server | ||
228 | //Uncomment when prim/object UUIDs are random or such | ||
229 | //2007-03-22 - Randomskk | ||
230 | //this._primCount--; | ||
231 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Deleted UUID " + ent.uuid); | ||
232 | } | ||
233 | } | ||
234 | } | ||
235 | foreach( libsecondlife.LLUUID uuid in DeRezEnts ) | ||
236 | { | ||
237 | lock (OpenSimRoot.Instance.LocalWorld.Entities) | ||
238 | { | ||
239 | //OpenSimRoot.Instance.LocalWorld.Entities.Remove(uuid); | ||
240 | } | ||
241 | } | ||
242 | |||
243 | } | ||
202 | 244 | ||
203 | public bool Backup() { | 245 | public bool Backup() { |
204 | 246 | ||