diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 46 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 13 |
2 files changed, 31 insertions, 28 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 4b30a80..e0fd459 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -262,7 +262,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
262 | if (rezAsset != null) | 262 | if (rezAsset != null) |
263 | { | 263 | { |
264 | string script = Util.FieldToString(rezAsset.Data); | 264 | string script = Util.FieldToString(rezAsset.Data); |
265 | // Console.WriteLine("rez script " + script); | 265 | // Console.WriteLine("rez script " + script); |
266 | this.EventManager.TriggerRezScript(localID, copyID, script); | 266 | this.EventManager.TriggerRezScript(localID, copyID, script); |
267 | rezzed = true; | 267 | rezzed = true; |
268 | } | 268 | } |
@@ -270,22 +270,22 @@ namespace OpenSim.Region.Environment.Scenes | |||
270 | 270 | ||
271 | if (rezzed) | 271 | if (rezzed) |
272 | { | 272 | { |
273 | bool hasPrim = false; | 273 | bool hasPrim = false; |
274 | foreach (EntityBase ent in Entities.Values) | 274 | foreach (EntityBase ent in Entities.Values) |
275 | { | 275 | { |
276 | if (ent is SceneObjectGroup) | 276 | if (ent is SceneObjectGroup) |
277 | { | 277 | { |
278 | hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID); | 278 | hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID); |
279 | if (hasPrim != false) | 279 | if (hasPrim != false) |
280 | { | 280 | { |
281 | 281 | ||
282 | bool added = ((SceneObjectGroup)ent).AddInventoryItem(remoteClient, localID, item, copyID); | 282 | bool added = ((SceneObjectGroup)ent).AddInventoryItem(remoteClient, localID, item, copyID); |
283 | ((SceneObjectGroup)ent).GetProperites(remoteClient); | 283 | ((SceneObjectGroup)ent).GetProperites(remoteClient); |
284 | 284 | ||
285 | } | 285 | } |
286 | } | 286 | } |
287 | } | 287 | } |
288 | 288 | ||
289 | } | 289 | } |
290 | } | 290 | } |
291 | } | 291 | } |
@@ -361,7 +361,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
361 | this.phyScene.RemovePrim(rootPart.PhysActor); | 361 | this.phyScene.RemovePrim(rootPart.PhysActor); |
362 | rootPart.PhysActor = null; | 362 | rootPart.PhysActor = null; |
363 | } | 363 | } |
364 | 364 | ||
365 | storageManager.DataStore.RemoveObject(((SceneObjectGroup)selectedEnt).UUID, m_regInfo.SimUUID); | 365 | storageManager.DataStore.RemoveObject(((SceneObjectGroup)selectedEnt).UUID, m_regInfo.SimUUID); |
366 | ((SceneObjectGroup)selectedEnt).DeleteGroup(); | 366 | ((SceneObjectGroup)selectedEnt).DeleteGroup(); |
367 | 367 | ||
@@ -415,11 +415,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
415 | this.AddEntity(group); | 415 | this.AddEntity(group); |
416 | group.AbsolutePosition = pos; | 416 | group.AbsolutePosition = pos; |
417 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); | 417 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); |
418 | rootPart.PhysActor = phyScene.AddPrim( | 418 | rootPart.PhysActor = phyScene.AddPrim( |
419 | new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, rootPart.AbsolutePosition.Z), | 419 | new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, rootPart.AbsolutePosition.Z), |
420 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), | 420 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), |
421 | new Axiom.Math.Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, | 421 | new Axiom.Math.Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, |
422 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z)); | 422 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z)); |
423 | } | 423 | } |
424 | 424 | ||
425 | 425 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 282e548..dcc3e16 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -544,11 +544,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
544 | /// <param name="ownerID"></param> | 544 | /// <param name="ownerID"></param> |
545 | public void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape) | 545 | public void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape) |
546 | { | 546 | { |
547 | SceneObjectGroup sceneOb = new SceneObjectGroup(this, this.m_regionHandle, ownerID, PrimIDAllocate(), pos, shape); | 547 | if (this.PermissionsMngr.CanRezObject(ownerID, pos)) |
548 | AddEntity(sceneOb); | 548 | { |
549 | SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID); | 549 | SceneObjectGroup sceneOb = new SceneObjectGroup(this, this.m_regionHandle, ownerID, PrimIDAllocate(), pos, shape); |
550 | rootPart.PhysActor =phyScene.AddPrim(new PhysicsVector(pos.X, pos.Y, pos.Z), new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z), | 550 | AddEntity(sceneOb); |
551 | new Axiom.Math.Quaternion()); | 551 | SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID); |
552 | rootPart.PhysActor = phyScene.AddPrim(new PhysicsVector(pos.X, pos.Y, pos.Z), new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z), | ||
553 | new Axiom.Math.Quaternion()); | ||
554 | } | ||
552 | } | 555 | } |
553 | 556 | ||
554 | public void RemovePrim(uint localID, LLUUID avatar_deleter) | 557 | public void RemovePrim(uint localID, LLUUID avatar_deleter) |