aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer/world/World.cs
diff options
context:
space:
mode:
authorAdam Frisby2007-03-24 16:06:43 +0000
committerAdam Frisby2007-03-24 16:06:43 +0000
commit47c682075c874f7a01970d3557528722b89a6ffd (patch)
tree14b84cfbb5c0cba183bc97eb305c9109dd4b652d /OpenSim.RegionServer/world/World.cs
parent* Removed old prebuild prebuild file (diff)
downloadopensim-SC_OLD-47c682075c874f7a01970d3557528722b89a6ffd.zip
opensim-SC_OLD-47c682075c874f7a01970d3557528722b89a6ffd.tar.gz
opensim-SC_OLD-47c682075c874f7a01970d3557528722b89a6ffd.tar.bz2
opensim-SC_OLD-47c682075c874f7a01970d3557528722b89a6ffd.tar.xz
Applying Randomskk's patches
Diffstat (limited to 'OpenSim.RegionServer/world/World.cs')
-rw-r--r--OpenSim.RegionServer/world/World.cs44
1 files changed, 43 insertions, 1 deletions
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