diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs
index d56cf6f90b..82ef08d757 100644
--- a/OpenSim/Framework/Communications/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs
@@ -304,7 +304,7 @@ namespace OpenSim.Region.Capabilities
private LLUUID newAssetID;
private LLUUID inventoryItemID;
private BaseHttpServer httpListener;
- private bool SaveAssets = true;
+ private bool SaveAssets = false;
private string m_assetName = "";
///
diff --git a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs b/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs
index 4148d081b5..395819d262 100644
--- a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs
+++ b/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs
@@ -47,10 +47,10 @@ namespace OpenSim.Region.Interfaces
/// The name of the database to store to (may not be applicable)
void Initialise(string filename, string dbname);
- void StoreObject(SceneObject obj);
+ void StoreObject(SceneObjectGroup obj);
void RemoveObject(LLUUID uuid);
- List LoadObjects();
+ List LoadObjects();
void StoreTerrain(double[,] terrain);
double[,] LoadTerrain();
diff --git a/OpenSim/Region/Environment/LandManagement/Land.cs b/OpenSim/Region/Environment/LandManagement/Land.cs
index 97f82760a2..e9f5248825 100644
--- a/OpenSim/Region/Environment/LandManagement/Land.cs
+++ b/OpenSim/Region/Environment/LandManagement/Land.cs
@@ -16,7 +16,7 @@ namespace OpenSim.Region.Environment.LandManagement
{
#region Member Variables
public LandData landData = new LandData();
- public List primsOverMe = new List();
+ public List primsOverMe = new List();
public Scene m_scene;
@@ -426,21 +426,21 @@ namespace OpenSim.Region.Environment.LandManagement
public void sendForceObjectSelect(int local_id, int request_type, IClientAPI remote_client)
{
List resultLocalIDs = new List();
- foreach (SceneObject obj in primsOverMe)
+ foreach (SceneObjectGroup obj in primsOverMe)
{
- if (obj.rootLocalID > 0)
+ if (obj.LocalId > 0)
{
- if (request_type == LandManager.LAND_SELECT_OBJECTS_OWNER && obj.rootPrimitive.OwnerID == this.landData.ownerID)
+ if (request_type == LandManager.LAND_SELECT_OBJECTS_OWNER && obj.OwnerID == this.landData.ownerID)
{
- resultLocalIDs.Add(obj.rootLocalID);
+ resultLocalIDs.Add(obj.LocalId);
}
else if (request_type == LandManager.LAND_SELECT_OBJECTS_GROUP && false) //TODO: change false to group support!
{
}
- else if (request_type == LandManager.LAND_SELECT_OBJECTS_OTHER && obj.rootPrimitive.OwnerID != remote_client.AgentId)
+ else if (request_type == LandManager.LAND_SELECT_OBJECTS_OTHER && obj.OwnerID != remote_client.AgentId)
{
- resultLocalIDs.Add(obj.rootLocalID);
+ resultLocalIDs.Add(obj.LocalId);
}
}
}
@@ -486,13 +486,13 @@ namespace OpenSim.Region.Environment.LandManagement
public void sendLandObjectOwners(IClientAPI remote_client)
{
Dictionary ownersAndCount = new Dictionary();
- foreach (SceneObject obj in primsOverMe)
+ foreach (SceneObjectGroup obj in primsOverMe)
{
- if (!ownersAndCount.ContainsKey(obj.rootPrimitive.OwnerID))
+ if (!ownersAndCount.ContainsKey(obj.OwnerID))
{
- ownersAndCount.Add(obj.rootPrimitive.OwnerID, 0);
+ ownersAndCount.Add(obj.OwnerID, 0);
}
- ownersAndCount[obj.rootPrimitive.OwnerID] += obj.primCount;
+ ownersAndCount[obj.OwnerID] += obj.PrimCount;
}
if (ownersAndCount.Count > 0)
{
@@ -525,7 +525,7 @@ namespace OpenSim.Region.Environment.LandManagement
#endregion
#region Object Returning
- public void returnObject(SceneObject obj)
+ public void returnObject(SceneObjectGroup obj)
{
}
public void returnLandObjects(int type, LLUUID owner)
@@ -544,12 +544,12 @@ namespace OpenSim.Region.Environment.LandManagement
primsOverMe.Clear();
}
- public void addPrimToCount(SceneObject obj)
+ public void addPrimToCount(SceneObjectGroup obj)
{
- LLUUID prim_owner = obj.rootPrimitive.OwnerID;
- int prim_count = obj.primCount;
+ LLUUID prim_owner = obj.OwnerID;
+ int prim_count = obj.PrimCount;
- if (obj.isSelected)
+ if (obj.IsSelected)
{
landData.selectedPrims += prim_count;
}
@@ -569,12 +569,12 @@ namespace OpenSim.Region.Environment.LandManagement
}
- public void removePrimFromCount(SceneObject obj)
+ public void removePrimFromCount(SceneObjectGroup obj)
{
if (primsOverMe.Contains(obj))
{
- LLUUID prim_owner = obj.rootPrimitive.OwnerID;
- int prim_count = obj.primCount;
+ LLUUID prim_owner = obj.OwnerID;
+ int prim_count = obj.PrimCount;
if (prim_owner == landData.ownerID)
{
diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs
index f759934325..f67b51a48d 100644
--- a/OpenSim/Region/Environment/LandManagement/LandManager.cs
+++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs
@@ -552,7 +552,7 @@ namespace OpenSim.Region.Environment.LandManagement
this.landPrimCountTainted = true;
}
- public void addPrimToLandPrimCounts(SceneObject obj)
+ public void addPrimToLandPrimCounts(SceneObjectGroup obj)
{
LLVector3 position = obj.Pos;
Land landUnderPrim = getLandObject(position.X, position.Y);
@@ -562,7 +562,7 @@ namespace OpenSim.Region.Environment.LandManagement
}
}
- public void removePrimFromLandPrimCounts(SceneObject obj)
+ public void removePrimFromLandPrimCounts(SceneObjectGroup obj)
{
foreach (Land p in landList.Values)
{
diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs
index 150a8ed9d7..07585668b2 100644
--- a/OpenSim/Region/Environment/PermissionManager.cs
+++ b/OpenSim/Region/Environment/PermissionManager.cs
@@ -53,11 +53,11 @@ namespace OpenSim.Region.Environment
bool permission = false;
// If it's not an object, we cant edit it.
- if (!(m_scene.Entities[obj] is SceneObject))
+ if (!(m_scene.Entities[obj] is SceneObjectGroup))
return false;
- SceneObject task = (SceneObject)m_scene.Entities[obj];
- LLUUID taskOwner = task.rootPrimitive.OwnerID;
+ SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[obj];
+ LLUUID taskOwner = null;
// Object owners should be able to edit their own content
if (user == taskOwner)
diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive(Old).cs
similarity index 97%
rename from OpenSim/Region/Environment/Scenes/Primitive.cs
rename to OpenSim/Region/Environment/Scenes/Primitive(Old).cs
index 132eabb1bf..64976a8737 100644
--- a/OpenSim/Region/Environment/Scenes/Primitive.cs
+++ b/OpenSim/Region/Environment/Scenes/Primitive(Old).cs
@@ -45,7 +45,7 @@ namespace OpenSim.Region.Environment.Scenes
private PrimitiveBaseShape m_shape;
private byte[] m_particleSystem = new byte[0];
- public SceneObject m_RootParent;
+ public SceneObjectOLD m_RootParent;
public bool m_isRootPrim;
public EntityBase m_Parent;
@@ -144,7 +144,7 @@ namespace OpenSim.Region.Environment.Scenes
#region Constructors
public Primitive(ulong regionHandle, Scene scene, LLUUID ownerID, uint localID, bool isRoot, EntityBase parent,
- SceneObject rootObject, PrimitiveBaseShape shape, LLVector3 pos)
+ SceneObjectOLD rootObject, PrimitiveBaseShape shape, LLVector3 pos)
{
m_regionHandle = regionHandle;
m_scene = scene;
@@ -184,7 +184,7 @@ namespace OpenSim.Region.Environment.Scenes
#region Duplication
- public Primitive Copy(EntityBase parent, SceneObject rootParent)
+ public Primitive Copy(EntityBase parent, SceneObjectOLD rootParent)
{
Primitive dupe = (Primitive)MemberwiseClone();
@@ -204,7 +204,7 @@ namespace OpenSim.Region.Environment.Scenes
dupe.m_uuid = LLUUID.Random();
dupe.LocalId = newLocalID;
- if (parent is SceneObject)
+ if (parent is SceneObjectGroup)
{
dupe.m_isRootPrim = true;
dupe.ParentID = 0;
@@ -314,13 +314,13 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public void AddNewChildren(SceneObject linkObject)
+ public void AddNewChildren(SceneObjectOLD linkObject)
{
// Console.WriteLine("linking new prims " + linkObject.rootLocalID + " to me (" + this.LocalId + ")");
//TODO check permissions
m_children.Add(linkObject.rootPrimitive);
- linkObject.rootPrimitive.SetNewParent(this, m_RootParent);
+ linkObject.rootPrimitive.SetNewParent(this, m_RootParent);
m_scene.DeleteEntity(linkObject.rootUUID);
linkObject.DeleteAllChildren();
@@ -333,7 +333,7 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public void SetNewParent(Primitive newParent, SceneObject rootParent)
+ public void SetNewParent(Primitive newParent, SceneObjectOLD rootParent)
{
LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z);
m_isRootPrim = false;
@@ -363,7 +363,7 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public void SetRootParent(SceneObject newRoot, Primitive newParent, LLVector3 oldParentPosition,
+ public void SetRootParent(SceneObjectOLD newRoot, Primitive newParent, LLVector3 oldParentPosition,
Quaternion oldParentRotation)
{
LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z);
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 2f3ce6e79a..4300ce4e19 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -272,14 +272,14 @@ namespace OpenSim.Region.Environment.Scenes
///
public void DuplicateObject(uint originalPrim, LLVector3 offset, uint flags)
{
- SceneObject originPrim = null;
+ SceneObjectGroup originPrim = null;
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- if (((SceneObject)ent).rootLocalID == originalPrim)
+ if (((SceneObjectGroup)ent).LocalId == originalPrim)
{
- originPrim = (SceneObject)ent;
+ originPrim = (SceneObjectGroup)ent;
break;
}
}
@@ -287,15 +287,16 @@ namespace OpenSim.Region.Environment.Scenes
if (originPrim != null)
{
- SceneObject copy = originPrim.Copy();
+ SceneObjectGroup copy = originPrim.Copy();
copy.Pos = copy.Pos + offset;
- this.Entities.Add(copy.rootUUID, copy);
+ this.Entities.Add(copy.UUID, copy);
- List avatars = this.RequestAvatarList();
+ copy.ScheduleGroupForFullUpdate();
+ /* List avatars = this.RequestAvatarList();
for (int i = 0; i < avatars.Count; i++)
{
- copy.SendAllChildPrimsToClient(avatars[i].ControllingClient);
- }
+ // copy.SendAllChildPrimsToClient(avatars[i].ControllingClient);
+ }*/
}
else
@@ -312,40 +313,40 @@ namespace OpenSim.Region.Environment.Scenes
///
public void LinkObjects(uint parentPrim, List childPrims)
{
- SceneObject parenPrim = null;
+ SceneObjectGroup parenPrim = null;
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- if (((SceneObject)ent).rootLocalID == parentPrim)
+ if (((SceneObjectGroup)ent).LocalId == parentPrim)
{
- parenPrim = (SceneObject)ent;
+ parenPrim = (SceneObjectGroup)ent;
break;
}
}
}
- List children = new List();
+ List children = new List();
if (parenPrim != null)
{
for (int i = 0; i < childPrims.Count; i++)
{
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- if (((SceneObject)ent).rootLocalID == childPrims[i])
+ if (((SceneObjectGroup)ent).LocalId == childPrims[i])
{
- children.Add((SceneObject)ent);
+ children.Add((SceneObjectGroup)ent);
}
}
}
}
}
- foreach (SceneObject sceneObj in children)
+ foreach (SceneObjectGroup sceneObj in children)
{
- parenPrim.AddNewChildPrims(sceneObj);
+ parenPrim.LinkToGroup(sceneObj);
}
}
@@ -356,15 +357,15 @@ namespace OpenSim.Region.Environment.Scenes
///
public void UpdatePrimShape(uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock)
{
- Primitive prim = null;
+ bool hasPrim = false;
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- prim = ((SceneObject)ent).HasChildPrim(primLocalID);
- if (prim != null)
+ hasPrim = ((SceneObjectGroup)ent).HasChildPrim(primLocalID);
+ if (hasPrim != false)
{
- prim.UpdateShape(shapeBlock);
+ ((SceneObjectGroup)ent).UpdateShape(shapeBlock, primLocalID);
break;
}
}
@@ -373,15 +374,15 @@ namespace OpenSim.Region.Environment.Scenes
public void UpdateExtraParam(uint primLocalID, ushort type, bool inUse, byte[] data)
{
- Primitive prim = null;
+ bool hasPrim = false;
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- prim = ((SceneObject)ent).HasChildPrim(primLocalID);
- if (prim != null)
+ hasPrim = ((SceneObjectGroup)ent).HasChildPrim(primLocalID);
+ if (hasPrim != false)
{
- prim.UpdateExtraParam(type, inUse, data);
+ ((SceneObjectGroup)ent).UpdateExtraParam(primLocalID, type, inUse, data);
break;
}
}
@@ -395,15 +396,16 @@ namespace OpenSim.Region.Environment.Scenes
///
public void RequestTaskInventory(IClientAPI remoteClient, uint primLocalID)
{
- Primitive prim = null;
+
+ bool hasPrim = false;
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- prim = ((SceneObject)ent).HasChildPrim(primLocalID);
- if (prim != null)
+ hasPrim = ((SceneObjectGroup)ent).HasChildPrim(primLocalID);
+ if (hasPrim != false)
{
- prim.GetInventory(remoteClient, primLocalID);
+ ((SceneObjectGroup)ent).GetPartInventory(remoteClient, primLocalID);
break;
}
}
@@ -419,12 +421,12 @@ namespace OpenSim.Region.Environment.Scenes
{
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- if (((SceneObject)ent).rootLocalID == primLocalID)
+ if (((SceneObjectGroup)ent).LocalId == primLocalID)
{
- ((SceneObject)ent).GetProperites(remoteClient);
- ((SceneObject)ent).isSelected = true;
+ ((SceneObjectGroup)ent).GetProperites(remoteClient);
+ ((SceneObjectGroup)ent).IsSelected = true;
this.LandManager.setPrimsTainted();
break;
}
@@ -441,11 +443,11 @@ namespace OpenSim.Region.Environment.Scenes
{
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- if (((SceneObject)ent).rootLocalID == primLocalID)
+ if (((SceneObjectGroup)ent).LocalId == primLocalID)
{
- ((SceneObject)ent).isSelected = false;
+ ((SceneObjectGroup)ent).IsSelected = false;
this.LandManager.setPrimsTainted();
break;
}
@@ -460,15 +462,15 @@ namespace OpenSim.Region.Environment.Scenes
///
public void PrimDescription(uint primLocalID, string description)
{
- Primitive prim = null;
+ bool hasPrim = false;
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- prim = ((SceneObject)ent).HasChildPrim(primLocalID);
- if (prim != null)
+ hasPrim = ((SceneObjectGroup)ent).HasChildPrim(primLocalID);
+ if (hasPrim != false)
{
- prim.Description = description;
+ ((SceneObjectGroup)ent).SetPartDescription(description, primLocalID);
break;
}
}
@@ -482,15 +484,15 @@ namespace OpenSim.Region.Environment.Scenes
///
public void PrimName(uint primLocalID, string name)
{
- Primitive prim = null;
+ bool hasPrim = false;
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- prim = ((SceneObject)ent).HasChildPrim(primLocalID);
- if (prim != null)
+ hasPrim = ((SceneObjectGroup)ent).HasChildPrim(primLocalID);
+ if (hasPrim != false)
{
- prim.Name = name;
+ ((SceneObjectGroup)ent).SetPartName(name, primLocalID);
break;
}
}
@@ -499,27 +501,19 @@ namespace OpenSim.Region.Environment.Scenes
public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient)
{
- Primitive prim = null;
+ bool hasPrim = false;
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- prim = ((SceneObject)ent).HasChildPrim(objectID);
- if (prim != null)
+ hasPrim = ((SceneObjectGroup)ent).HasChildPrim(objectID);
+ if (hasPrim != false)
{
- ((SceneObject)ent).GrapMovement(offset, pos, remoteClient);
+ ((SceneObjectGroup)ent).GrapMovement(offset, pos, remoteClient);
break;
}
}
}
- /*
- if (this.Entities.ContainsKey(objectID))
- {
- if (this.Entities[objectID] is SceneObject)
- {
- ((SceneObject)this.Entities[objectID]).GrapMovement(offset, pos, remoteClient);
- }
- }*/
}
///
@@ -541,15 +535,16 @@ namespace OpenSim.Region.Environment.Scenes
///
public void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient)
{
- Primitive prim = null;
+ bool hasPrim = false;
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- prim = ((SceneObject)ent).HasChildPrim(localID);
- if (prim != null)
+ hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID);
+ if (hasPrim != false)
{
- prim.UpdateTextureEntry(texture);
+ ((SceneObjectGroup)ent).UpdateTextureEntry(localID, texture);
+ break;
}
}
}
@@ -563,15 +558,15 @@ namespace OpenSim.Region.Environment.Scenes
///
public void UpdatePrimPosition(uint localID, LLVector3 pos, IClientAPI remoteClient)
{
- Primitive prim = null;
+ bool hasPrim = false;
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- prim = ((SceneObject)ent).HasChildPrim(localID);
- if (prim != null)
+ hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID);
+ if (hasPrim != false)
{
- prim.UpdateGroupPosition(pos);
+ ((SceneObjectGroup)ent).UpdateGroupPosition(pos);
break;
}
}
@@ -583,9 +578,9 @@ namespace OpenSim.Region.Environment.Scenes
Primitive prim = null;
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- prim = ((SceneObject)ent).HasChildPrim(localID);
+ //prim = ((SceneObject)ent).HasChildPrim(localID);
if (prim != null)
{
prim.UpdateSinglePosition(pos);
@@ -604,15 +599,16 @@ namespace OpenSim.Region.Environment.Scenes
///
public void UpdatePrimRotation(uint localID, LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient)
{
- Primitive prim = null;
+ bool hasPrim = false;
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- prim = ((SceneObject)ent).HasChildPrim(localID);
- if (prim != null)
+ hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID);
+ if (hasPrim != false)
{
- prim.UpdateGroupMouseRotation(pos, rot);
+ ((SceneObjectGroup)ent).UpdateGroupRotation(pos, rot);
+ // prim.UpdateGroupMouseRotation(pos, rot);
break;
}
}
@@ -627,15 +623,16 @@ namespace OpenSim.Region.Environment.Scenes
///
public void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient)
{
- Primitive prim = null;
+ bool hasPrim = false;
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- prim = ((SceneObject)ent).HasChildPrim(localID);
- if (prim != null)
+ hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID);
+ if (hasPrim != false)
{
- prim.UpdateGroupRotation(rot);
+ ((SceneObjectGroup)ent).UpdateGroupRotation(rot);
+ //prim.UpdateGroupRotation(rot);
break;
}
}
@@ -654,9 +651,9 @@ namespace OpenSim.Region.Environment.Scenes
Primitive prim = null;
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- prim = ((SceneObject)ent).HasChildPrim(localID);
+ // prim = ((SceneObject)ent).HasChildPrim(localID);
if (prim != null)
{
prim.UpdateSingleRotation(rot);
@@ -674,15 +671,16 @@ namespace OpenSim.Region.Environment.Scenes
///
public void UpdatePrimScale(uint localID, LLVector3 scale, IClientAPI remoteClient)
{
- Primitive prim = null;
+ bool hasPrim = false;
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- prim = ((SceneObject)ent).HasChildPrim(localID);
- if (prim != null)
+ hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID);
+ if (hasPrim != false)
{
- prim.ResizeGoup(scale);
+ ((SceneObjectGroup)ent).Resize(scale, localID);
+ // prim.ResizeGoup(scale);
break;
}
}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 813308b380..c2eac60c9e 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Region.Environment.Scenes
{
protected Timer m_heartbeatTimer = new Timer();
protected Dictionary Avatars;
- protected Dictionary Prims;
+ protected Dictionary Prims;
protected PhysicsScene phyScene;
protected float timeStep = 0.1f;
private Random Rand = new Random();
@@ -109,7 +109,7 @@ namespace OpenSim.Region.Environment.Scenes
get { return m_scriptManager; }
}
- public Dictionary Objects
+ public Dictionary Objects
{
get { return Prims; }
}
@@ -149,11 +149,11 @@ namespace OpenSim.Region.Environment.Scenes
MainLog.Instance.Verbose("Creating new entitities instance");
Entities = new Dictionary();
Avatars = new Dictionary();
- Prims = new Dictionary();
+ Prims = new Dictionary();
MainLog.Instance.Verbose("Loading objects from datastore");
- List PrimsFromDB = storageManager.DataStore.LoadObjects();
- foreach (SceneObject prim in PrimsFromDB)
+ List PrimsFromDB = storageManager.DataStore.LoadObjects();
+ foreach (SceneObjectGroup prim in PrimsFromDB)
{
AddEntity(prim);
}
@@ -463,10 +463,10 @@ namespace OpenSim.Region.Environment.Scenes
public void LoadPrimsFromStorage()
{
MainLog.Instance.Verbose("World.cs: LoadPrimsFromStorage() - Loading primitives");
- List NewObjectsList = storageManager.DataStore.LoadObjects();
- foreach (SceneObject obj in NewObjectsList)
+ List NewObjectsList = storageManager.DataStore.LoadObjects();
+ foreach (SceneObjectGroup obj in NewObjectsList)
{
- this.Objects.Add(obj.rootUUID, obj);
+ this.Objects.Add(obj.UUID, obj);
}
}
@@ -501,7 +501,7 @@ namespace OpenSim.Region.Environment.Scenes
///
public void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape)
{
- SceneObject sceneOb = new SceneObject(this, m_eventManager, ownerID, PrimIDAllocate(), pos, shape);
+ SceneObjectGroup sceneOb = new SceneObjectGroup(this, this.m_regionHandle, ownerID, PrimIDAllocate(), pos, shape);
AddEntity(sceneOb);
}
@@ -509,28 +509,28 @@ namespace OpenSim.Region.Environment.Scenes
{
foreach (EntityBase obj in Entities.Values)
{
- if (obj is SceneObject)
+ if (obj is SceneObjectGroup)
{
- if (((SceneObject) obj).LocalId == localID)
+ if (((SceneObjectGroup) obj).LocalId == localID)
{
- RemoveEntity((SceneObject) obj);
+ RemoveEntity((SceneObjectGroup) obj);
return;
}
}
}
}
- public void AddEntity(SceneObject sceneObject)
+ public void AddEntity(SceneObjectGroup sceneObject)
{
- Entities.Add(sceneObject.rootUUID, sceneObject);
+ Entities.Add(sceneObject.UUID, sceneObject);
}
- public void RemoveEntity(SceneObject sceneObject)
+ public void RemoveEntity(SceneObjectGroup sceneObject)
{
- if (Entities.ContainsKey(sceneObject.rootUUID))
+ if (Entities.ContainsKey(sceneObject.UUID))
{
m_LandManager.removePrimFromLandPrimCounts(sceneObject);
- Entities.Remove(sceneObject.rootUUID);
+ Entities.Remove(sceneObject.UUID);
m_LandManager.setPrimsTainted();
}
}
@@ -779,9 +779,9 @@ namespace OpenSim.Region.Environment.Scenes
{
foreach (EntityBase ent in Entities.Values)
{
- if (ent is SceneObject)
+ if (ent is SceneObjectGroup)
{
- ((SceneObject) ent).SendAllChildPrimsToClient(client);
+ // ((SceneObject) ent).SendAllChildPrimsToClient(client);
}
}
}
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index eb1d5b4078..1df95cf0a5 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -22,7 +22,7 @@ namespace OpenSim.Region.Environment.Scenes
public delegate void OnParcelPrimCountUpdateDelegate();
public event OnParcelPrimCountUpdateDelegate OnParcelPrimCountUpdate;
- public delegate void OnParcelPrimCountAddDelegate(SceneObject obj);
+ public delegate void OnParcelPrimCountAddDelegate(SceneObjectGroup obj);
public event OnParcelPrimCountAddDelegate OnParcelPrimCountAdd;
public delegate void OnScriptConsoleDelegate(string[] args);
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Environment.Scenes
OnParcelPrimCountUpdate();
}
}
- public void TriggerParcelPrimCountAdd(SceneObject obj)
+ public void TriggerParcelPrimCountAdd(SceneObjectGroup obj)
{
if (OnParcelPrimCountAdd != null)
{
diff --git a/OpenSim/Region/Environment/Scenes/SceneObject.cs b/OpenSim/Region/Environment/Scenes/SceneObject(Old).cs
similarity index 94%
rename from OpenSim/Region/Environment/Scenes/SceneObject.cs
rename to OpenSim/Region/Environment/Scenes/SceneObject(Old).cs
index 2fae556282..882b72edb5 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObject.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObject(Old).cs
@@ -38,7 +38,7 @@ using OpenSim.Physics.Manager;
namespace OpenSim.Region.Environment.Scenes
{
- public class SceneObject : EntityBase
+ public class SceneObjectOLD : EntityBase
{
private Encoding enc = Encoding.ASCII;
private Dictionary ChildPrimitives = new Dictionary(); //list of all primitive id's that are part of this group
@@ -86,7 +86,7 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public SceneObject(Scene world, EventManager eventManager, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape)
+ public SceneObjectOLD(Scene world, EventManager eventManager, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape)
{
m_regionHandle = world.RegionInfo.RegionHandle;
m_scene = world;
@@ -102,7 +102,7 @@ namespace OpenSim.Region.Environment.Scenes
///
///
/// Need a null constructor for duplication
- public SceneObject()
+ public SceneObjectOLD()
{
}
@@ -125,7 +125,7 @@ namespace OpenSim.Region.Environment.Scenes
///
public void ProcessBackup(OpenSim.Region.Interfaces.IRegionDataStore datastore)
{
- datastore.StoreObject(this);
+ // datastore.StoreObject(this);
}
///
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Environment.Scenes
private void ProcessParcelPrimCountUpdate()
{
- m_eventManager.TriggerParcelPrimCountAdd(this);
+ // m_eventManager.TriggerParcelPrimCountAdd(this);
}
///
@@ -146,7 +146,7 @@ namespace OpenSim.Region.Environment.Scenes
public void CreateRootFromShape(LLUUID agentID, uint localID, PrimitiveBaseShape shape, LLVector3 pos)
{
- this.rootPrimitive = new Primitive(this.m_regionHandle, this.m_scene, agentID, localID, true, this, this, shape, pos);
+ // this.rootPrimitive = new Primitive(this.m_regionHandle, this.m_scene, agentID, localID, true, this, this, shape, pos);
this.m_children.Add(rootPrimitive);
this.ChildPrimitives.Add(this.rootUUID, this.rootPrimitive);
@@ -165,9 +165,9 @@ namespace OpenSim.Region.Environment.Scenes
/// Makes a copy of this SceneObject (and child primitives)
///
/// A complete copy of the object
- public new SceneObject Copy()
+ public new SceneObjectOLD Copy()
{
- SceneObject dupe = new SceneObject();
+ SceneObjectOLD dupe = new SceneObjectOLD();
dupe.m_scene = this.m_scene;
dupe.m_eventManager = this.m_eventManager;
@@ -207,7 +207,7 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public void AddNewChildPrims(SceneObject primObject)
+ public void AddNewChildPrims(SceneObjectOLD primObject)
{
this.rootPrimitive.AddNewChildren(primObject);
}
diff --git a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
similarity index 78%
rename from OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs
rename to OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 86610c0ac4..b7bc229619 100644
--- a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -11,12 +11,12 @@ namespace OpenSim.Region.Environment.Scenes
{
// public delegate void PrimCountTaintedDelegate();
- public class AllNewSceneObjectGroup2 : EntityBase
+ public class SceneObjectGroup : EntityBase
{
private Encoding enc = Encoding.ASCII;
- protected AllNewSceneObjectPart2 m_rootPart;
- protected Dictionary m_parts = new Dictionary();
+ protected SceneObjectPart m_rootPart;
+ protected Dictionary m_parts = new Dictionary();
protected ulong m_regionHandle;
@@ -38,6 +38,12 @@ namespace OpenSim.Region.Environment.Scenes
get { return new LLVector3(0, 0, 0); }
}
+ public Dictionary Children
+ {
+ get { return this.m_parts; }
+ set { m_parts = value; }
+ }
+
public override LLVector3 Pos
{
get { return m_rootPart.GroupPosition; }
@@ -45,7 +51,7 @@ namespace OpenSim.Region.Environment.Scenes
{
lock (this.m_parts)
{
- foreach (AllNewSceneObjectPart2 part in this.m_parts.Values)
+ foreach (SceneObjectPart part in this.m_parts.Values)
{
part.GroupPosition = value;
}
@@ -65,10 +71,29 @@ namespace OpenSim.Region.Environment.Scenes
set { m_rootPart.UUID = value; }
}
+ public LLUUID OwnerID
+ {
+ get { return m_rootPart.OwnerID; }
+ }
+
+ ///
+ /// Added because the Parcel code seems to use it
+ /// but not sure a object should have this
+ /// as what does it tell us? that some avatar has selected it
+ /// think really there should be a list (or whatever) in each scenepresence
+ /// saying what prim(s) that user has selected at any time.
+ ///
+ protected bool m_isSelected = false;
+ public bool IsSelected
+ {
+ get{ return m_isSelected;}
+ set { m_isSelected = value; }
+ }
+
///
///
///
- public AllNewSceneObjectGroup2()
+ public SceneObjectGroup()
{
}
@@ -76,7 +101,7 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public AllNewSceneObjectGroup2(byte[] data)
+ public SceneObjectGroup(byte[] data)
{
}
@@ -84,14 +109,14 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public AllNewSceneObjectGroup2(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape)
+ public SceneObjectGroup(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape)
{
m_regionHandle = regionHandle;
m_scene = scene;
this.Pos = pos;
LLVector3 rootOffset = new LLVector3(0, 0, 0);
- AllNewSceneObjectPart2 newPart = new AllNewSceneObjectPart2(m_regionHandle, this, ownerID, localID, shape, pos, rootOffset);
+ SceneObjectPart newPart = new SceneObjectPart(m_regionHandle, this, ownerID, localID, shape, pos, rootOffset);
this.m_parts.Add(newPart.UUID, newPart);
this.SetPartAsRoot(newPart);
}
@@ -102,16 +127,16 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public new AllNewSceneObjectGroup2 Copy()
+ public new SceneObjectGroup Copy()
{
- AllNewSceneObjectGroup2 dupe = (AllNewSceneObjectGroup2)this.MemberwiseClone();
+ SceneObjectGroup dupe = (SceneObjectGroup)this.MemberwiseClone();
dupe.Pos = new LLVector3(Pos.X, Pos.Y, Pos.Z);
dupe.m_scene = m_scene;
dupe.m_regionHandle = this.m_regionHandle;
dupe.CopyRootPart(this.m_rootPart);
- foreach (AllNewSceneObjectPart2 part in this.m_parts.Values)
+ foreach (SceneObjectPart part in this.m_parts.Values)
{
if (part.UUID != this.m_rootPart.UUID)
{
@@ -125,9 +150,9 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public void CopyRootPart(AllNewSceneObjectPart2 part)
+ public void CopyRootPart(SceneObjectPart part)
{
- AllNewSceneObjectPart2 newPart = part.Copy(m_scene.PrimIDAllocate());
+ SceneObjectPart newPart = part.Copy(m_scene.PrimIDAllocate());
this.m_parts.Add(newPart.UUID, newPart);
this.SetPartAsRoot(newPart);
}
@@ -136,9 +161,9 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public void CopyPart(AllNewSceneObjectPart2 part)
+ public void CopyPart(SceneObjectPart part)
{
- AllNewSceneObjectPart2 newPart = part.Copy(m_scene.PrimIDAllocate());
+ SceneObjectPart newPart = part.Copy(m_scene.PrimIDAllocate());
this.m_parts.Add(newPart.UUID, newPart);
this.SetPartAsNonRoot(newPart);
}
@@ -149,7 +174,7 @@ namespace OpenSim.Region.Environment.Scenes
///
public override void Update()
{
- foreach (AllNewSceneObjectPart2 part in this.m_parts.Values)
+ foreach (SceneObjectPart part in this.m_parts.Values)
{
part.SendScheduledUpdates();
}
@@ -160,7 +185,7 @@ namespace OpenSim.Region.Environment.Scenes
///
public void ScheduleGroupForFullUpdate()
{
- foreach (AllNewSceneObjectPart2 part in this.m_parts.Values)
+ foreach (SceneObjectPart part in this.m_parts.Values)
{
part.ScheduleFullUpdate();
}
@@ -171,7 +196,7 @@ namespace OpenSim.Region.Environment.Scenes
///
public void ScheduleGroupForTerseUpdate()
{
- foreach (AllNewSceneObjectPart2 part in this.m_parts.Values)
+ foreach (SceneObjectPart part in this.m_parts.Values)
{
part.ScheduleTerseUpdate();
}
@@ -182,7 +207,7 @@ namespace OpenSim.Region.Environment.Scenes
///
public void SendGroupFullUpdate()
{
- foreach (AllNewSceneObjectPart2 part in this.m_parts.Values)
+ foreach (SceneObjectPart part in this.m_parts.Values)
{
part.SendFullUpdateToAllClients();
}
@@ -193,7 +218,7 @@ namespace OpenSim.Region.Environment.Scenes
///
public void SendGroupTerseUpdate()
{
- foreach (AllNewSceneObjectPart2 part in this.m_parts.Values)
+ foreach (SceneObjectPart part in this.m_parts.Values)
{
part.SendTerseUpdateToAllClients();
}
@@ -203,7 +228,7 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public void LinkToGroup(AllNewSceneObjectGroup2 objectGroup)
+ public void LinkToGroup(SceneObjectGroup objectGroup)
{
}
@@ -213,9 +238,9 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- private AllNewSceneObjectPart2 GetChildPrim(LLUUID primID)
+ private SceneObjectPart GetChildPrim(LLUUID primID)
{
- AllNewSceneObjectPart2 childPart = null;
+ SceneObjectPart childPart = null;
if (this.m_parts.ContainsKey(primID))
{
childPart = this.m_parts[primID];
@@ -228,9 +253,9 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- private AllNewSceneObjectPart2 GetChildPrim(uint localID)
+ private SceneObjectPart GetChildPrim(uint localID)
{
- foreach (AllNewSceneObjectPart2 part in this.m_parts.Values)
+ foreach (SceneObjectPart part in this.m_parts.Values)
{
if (part.LocalID == localID)
{
@@ -248,7 +273,7 @@ namespace OpenSim.Region.Environment.Scenes
///
public bool HasChildPrim(LLUUID primID)
{
- AllNewSceneObjectPart2 childPart = null;
+ SceneObjectPart childPart = null;
if (this.m_parts.ContainsKey(primID))
{
childPart = this.m_parts[primID];
@@ -265,7 +290,7 @@ namespace OpenSim.Region.Environment.Scenes
///
public bool HasChildPrim(uint localID)
{
- foreach (AllNewSceneObjectPart2 part in this.m_parts.Values)
+ foreach (SceneObjectPart part in this.m_parts.Values)
{
if (part.LocalID == localID)
{
@@ -315,7 +340,7 @@ namespace OpenSim.Region.Environment.Scenes
proper.ObjectData[0].GroupID = LLUUID.Zero;
proper.ObjectData[0].InventorySerial = 0;
proper.ObjectData[0].LastOwnerID = this.m_rootPart.LastOwnerID;
- proper.ObjectData[0].ObjectID = this.m_uuid;
+ proper.ObjectData[0].ObjectID = this.UUID;
proper.ObjectData[0].OwnerID = this.m_rootPart.OwnerID;
proper.ObjectData[0].TouchName = enc.GetBytes(this.m_rootPart.TouchName + "\0");
proper.ObjectData[0].TextureID = new byte[0];
@@ -331,14 +356,36 @@ namespace OpenSim.Region.Environment.Scenes
client.OutPacket(proper);
}
+ ///
+ ///
+ ///
+ ///
+ public void SetPartName(string name, uint localID)
+ {
+ SceneObjectPart part = this.GetChildPrim(localID);
+ if (part != null)
+ {
+ part.PartName = name;
+ }
+ }
+
+ public void SetPartDescription(string des, uint localID)
+ {
+ SceneObjectPart part = this.GetChildPrim(localID);
+ if (part != null)
+ {
+ part.Description = des;
+ }
+ }
+
///
///
///
///
///
- public void GetInventory(IClientAPI remoteClient, uint localID)
+ public void GetPartInventory(IClientAPI remoteClient, uint localID)
{
- AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
+ SceneObjectPart part = this.GetChildPrim(localID);
if (part != null)
{
part.GetInventory(remoteClient, localID);
@@ -354,7 +401,7 @@ namespace OpenSim.Region.Environment.Scenes
///
public void UpdateExtraParam(uint localID, ushort type, bool inUse, byte[] data)
{
- AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
+ SceneObjectPart part = this.GetChildPrim(localID);
if (part != null)
{
part.UpdateExtraParam(type, inUse, data);
@@ -368,7 +415,7 @@ namespace OpenSim.Region.Environment.Scenes
///
public void UpdateTextureEntry(uint localID, byte[] textureEntry)
{
- AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
+ SceneObjectPart part = this.GetChildPrim(localID);
if (part != null)
{
part.UpdateTextureEntry(textureEntry);
@@ -382,7 +429,7 @@ namespace OpenSim.Region.Environment.Scenes
///
public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock, uint localID)
{
- AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
+ SceneObjectPart part = this.GetChildPrim(localID);
if (part != null)
{
part.UpdateShape(shapeBlock);
@@ -390,6 +437,20 @@ namespace OpenSim.Region.Environment.Scenes
}
#endregion
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void Resize(LLVector3 scale, uint localID)
+ {
+ SceneObjectPart part = this.GetChildPrim(localID);
+ if (part != null)
+ {
+ part.Resize(scale);
+ }
+ }
+
#region Position
///
///
@@ -407,7 +468,7 @@ namespace OpenSim.Region.Environment.Scenes
///
public void UpdateSinglePosition(LLVector3 pos, uint localID)
{
- AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
+ SceneObjectPart part = this.GetChildPrim(localID);
if (part != null)
{
if (part.UUID == this.m_rootPart.UUID)
@@ -437,7 +498,7 @@ namespace OpenSim.Region.Environment.Scenes
diff.Y = axDiff.y;
diff.Z = axDiff.z;
- foreach (AllNewSceneObjectPart2 obPart in this.m_parts.Values)
+ foreach (SceneObjectPart obPart in this.m_parts.Values)
{
if (obPart.UUID != this.m_rootPart.UUID)
{
@@ -479,7 +540,7 @@ namespace OpenSim.Region.Environment.Scenes
///
public void UpdateSingleRotation(LLQuaternion rot, uint localID)
{
- AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
+ SceneObjectPart part = this.GetChildPrim(localID);
if (part != null)
{
if (part.UUID == this.m_rootPart.UUID)
@@ -503,7 +564,7 @@ namespace OpenSim.Region.Environment.Scenes
Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z);
Axiom.Math.Quaternion oldParentRot = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z);
- foreach (AllNewSceneObjectPart2 prim in this.m_parts.Values)
+ foreach (SceneObjectPart prim in this.m_parts.Values)
{
if (prim.UUID != this.m_rootPart.UUID)
{
@@ -524,7 +585,7 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- private void SetPartAsRoot(AllNewSceneObjectPart2 part)
+ private void SetPartAsRoot(SceneObjectPart part)
{
this.m_rootPart = part;
//this.m_uuid= part.UUID;
@@ -535,7 +596,7 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- private void SetPartAsNonRoot(AllNewSceneObjectPart2 part)
+ private void SetPartAsNonRoot(SceneObjectPart part)
{
part.ParentID = this.m_rootPart.LocalID;
}
@@ -554,7 +615,7 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- internal void SendPartFullUpdate(IClientAPI remoteClient, AllNewSceneObjectPart2 part)
+ internal void SendPartFullUpdate(IClientAPI remoteClient, SceneObjectPart part)
{
if( m_rootPart == part )
{
@@ -571,7 +632,7 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- internal void SendPartTerseUpdate(IClientAPI remoteClient, AllNewSceneObjectPart2 part)
+ internal void SendPartTerseUpdate(IClientAPI remoteClient, SceneObjectPart part)
{
if (m_rootPart == part)
{
diff --git a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
similarity index 94%
rename from OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs
rename to OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index c91701af4a..d0730d7867 100644
--- a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -10,7 +10,7 @@ using OpenSim.Framework.Types;
namespace OpenSim.Region.Environment.Scenes
{
- public class AllNewSceneObjectPart2
+ public class SceneObjectPart
{
private const uint FULL_MASK_PERMISSIONS = 2147483647;
@@ -29,7 +29,7 @@ namespace OpenSim.Region.Environment.Scenes
protected byte[] m_particleSystem = new byte[0];
- protected AllNewSceneObjectGroup2 m_parentGroup;
+ protected SceneObjectGroup m_parentGroup;
///
/// Only used internally to schedule client updates
@@ -42,7 +42,7 @@ namespace OpenSim.Region.Environment.Scenes
public LLUUID UUID
{
get { return m_uuid; }
- set { value = m_uuid; }
+ set { m_uuid = value ; }
}
protected uint m_localID;
@@ -176,7 +176,7 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public AllNewSceneObjectPart2()
+ public SceneObjectPart()
{
}
@@ -190,8 +190,9 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public AllNewSceneObjectPart2(ulong regionHandle, AllNewSceneObjectGroup2 parent, LLUUID ownerID, uint localID, PrimitiveBaseShape shape, LLVector3 groupPosition, LLVector3 offsetPosition)
+ public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID, PrimitiveBaseShape shape, LLVector3 groupPosition, LLVector3 offsetPosition)
{
+ this.m_partName = "Primitive";
this.m_regionHandle = regionHandle;
this.m_parentGroup = parent;
@@ -215,6 +216,7 @@ namespace OpenSim.Region.Environment.Scenes
{
}
+ ScheduleFullUpdate();
}
///
@@ -226,7 +228,7 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public AllNewSceneObjectPart2(ulong regionHandle, AllNewSceneObjectGroup2 parent, int creationDate, LLUUID ownerID, LLUUID creatorID, LLUUID lastOwnerID, uint localID, PrimitiveBaseShape shape, LLVector3 position, LLQuaternion rotation, uint flags)
+ public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, int creationDate, LLUUID ownerID, LLUUID creatorID, LLUUID lastOwnerID, uint localID, PrimitiveBaseShape shape, LLVector3 position, LLQuaternion rotation, uint flags)
{
this.m_regionHandle = regionHandle;
this.m_parentGroup = parent;
@@ -250,9 +252,9 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public AllNewSceneObjectPart2 Copy(uint localID)
+ public SceneObjectPart Copy(uint localID)
{
- AllNewSceneObjectPart2 dupe = (AllNewSceneObjectPart2)this.MemberwiseClone();
+ SceneObjectPart dupe = (SceneObjectPart)this.MemberwiseClone();
dupe.m_shape = m_shape.Copy();
dupe.m_regionHandle = m_regionHandle;
dupe.UUID = LLUUID.Random();
@@ -343,6 +345,7 @@ namespace OpenSim.Region.Environment.Scenes
this.m_shape.PathTaperY = shapeBlock.PathTaperY;
this.m_shape.PathTwist = shapeBlock.PathTwist;
this.m_shape.PathTwistBegin = shapeBlock.PathTwistBegin;
+ ScheduleFullUpdate();
}
#endregion
@@ -384,6 +387,7 @@ namespace OpenSim.Region.Environment.Scenes
public void UpdateTextureEntry(byte[] textureEntry)
{
this.m_shape.TextureEntry = textureEntry;
+ ScheduleFullUpdate();
}
#endregion
@@ -403,6 +407,7 @@ namespace OpenSim.Region.Environment.Scenes
{
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
this.OffsetPosition = newPos;
+ ScheduleTerseUpdate();
}
#endregion
@@ -410,6 +415,7 @@ namespace OpenSim.Region.Environment.Scenes
public void UpdateRotation(LLQuaternion rot)
{
this.RotationOffset = new LLQuaternion(rot.X, rot.Y, rot.Z, rot.W);
+ ScheduleTerseUpdate();
}
#endregion
@@ -421,6 +427,7 @@ namespace OpenSim.Region.Environment.Scenes
public void Resize(LLVector3 scale)
{
this.m_shape.Scale = scale;
+ ScheduleFullUpdate();
}
#endregion
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/Engines/CSharpEngine/Examples/ExportRegionToLSL.cs b/OpenSim/Region/Environment/Scenes/Scripting/Engines/CSharpEngine/Examples/ExportRegionToLSL.cs
index d5566b7816..97b1ada6ac 100644
--- a/OpenSim/Region/Environment/Scenes/Scripting/Engines/CSharpEngine/Examples/ExportRegionToLSL.cs
+++ b/OpenSim/Region/Environment/Scenes/Scripting/Engines/CSharpEngine/Examples/ExportRegionToLSL.cs
@@ -26,7 +26,7 @@ namespace OpenSim.Region.Scripting.Examples
void ProcessConsoleMsg(string[] args)
{
- if (args[0].ToLower() == "lslexport")
+ /*if (args[0].ToLower() == "lslexport")
{
string sequence = "";
@@ -48,12 +48,12 @@ namespace OpenSim.Region.Scripting.Examples
}
System.Console.WriteLine(sequence);
- }
+ }*/
}
string processPrimitiveToString(OpenSim.Region.Environment.Scenes.Primitive prim)
{
- string desc = prim.Description;
+ /*string desc = prim.Description;
string name = prim.Name;
LLVector3 pos = prim.Pos;
LLQuaternion rot = new LLQuaternion(prim.Rotation.x, prim.Rotation.y, prim.Rotation.z, prim.Rotation.w);
@@ -65,6 +65,8 @@ namespace OpenSim.Region.Scripting.Examples
setPrimParams += "[PRIM_SCALE, " + scale.ToString() + ", PRIM_POS, " + rootPos.ToString() + ", PRIM_ROTATION, " + rot.ToString() + "]\n";
return setPrimParams;
+ */
+ return "";
}
}
}
\ No newline at end of file
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/ScriptInterpretedAPI.cs b/OpenSim/Region/Environment/Scenes/Scripting/ScriptInterpretedAPI.cs
index af8a29fe89..a5898b77a1 100644
--- a/OpenSim/Region/Environment/Scenes/Scripting/ScriptInterpretedAPI.cs
+++ b/OpenSim/Region/Environment/Scenes/Scripting/ScriptInterpretedAPI.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Scripting
///
/// The object our script is supposed to be in
///
- public SceneObject Task
+ public SceneObjectGroup Task
{
get { return Scene.Objects[ObjectID]; }
}
@@ -229,8 +229,8 @@ namespace OpenSim.Region.Scripting
public void osCreateLink(Key target, int parent)
{
- if(Scene.Entities[target] is SceneObject)
- Task.AddNewChildPrims((SceneObject)Scene.Entities[target]);
+ if(Scene.Entities[target] is SceneObjectGroup)
+ Task.LinkToGroup((SceneObjectGroup)Scene.Entities[target]);
return;
}
diff --git a/OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs b/OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs
index 404653d7f2..108fa987d6 100644
--- a/OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs
+++ b/OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs
@@ -9,12 +9,12 @@ using System.Diagnostics;
namespace SimpleApp
{
- public class CpuCounterObject : SceneObject
+ public class CpuCounterObject : SceneObjectGroup
{
private PerformanceCounter m_counter;
- public CpuCounterObject(Scene world, EventManager eventManager, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape)
- : base(world, eventManager, ownerID, localID, pos, shape )
+ public CpuCounterObject(Scene world, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape)
+ : base(world, regionHandle, ownerID, localID, pos, shape )
{
String objectName = "Processor";
String counterName = "% Processor Time";
@@ -27,7 +27,7 @@ namespace SimpleApp
{
float cpu = m_counter.NextValue() / 40f;
LLVector3 size = new LLVector3(cpu, cpu, cpu);
- rootPrimitive.ResizeGoup( size );
+ //rootPrimitive.ResizeGoup( size );
base.UpdateMovement();
}
diff --git a/OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs b/OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs
index 83a76e3413..920fea778b 100644
--- a/OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs
+++ b/OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs
@@ -11,16 +11,16 @@ using Primitive=OpenSim.Region.Environment.Scenes.Primitive;
namespace SimpleApp
{
- public class FileSystemObject : SceneObject
+ public class FileSystemObject : SceneObjectGroup
{
public FileSystemObject(Scene world, FileInfo fileInfo, LLVector3 pos)
- : base( world, world.EventManager, LLUUID.Zero, world.NextLocalId, pos, BoxShape.Default )
+ : base( world, world.RegionInfo.RegionHandle, LLUUID.Zero, world.NextLocalId, pos, BoxShape.Default )
{
float size = (float)Math.Pow((double)fileInfo.Length, (double) 1 / 3) / 5;
- rootPrimitive.ResizeGoup(new LLVector3(size, size, size));
- rootPrimitive.Text = fileInfo.Name;
+ // rootPrimitive.ResizeGoup(new LLVector3(size, size, size));
+ // rootPrimitive.Text = fileInfo.Name;
}
public override void Update()
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs
index db71578c4e..84c86fd4c9 100644
--- a/OpenSim/Region/Examples/SimpleApp/Program.cs
+++ b/OpenSim/Region/Examples/SimpleApp/Program.cs
@@ -69,7 +69,7 @@ namespace SimpleApp
shape.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
LLVector3 pos = new LLVector3(138, 129, 27);
- SceneObject sceneObject = new CpuCounterObject(scene, scene.EventManager, LLUUID.Zero, scene.PrimIDAllocate(), pos, shape);
+ SceneObjectGroup sceneObject = new CpuCounterObject(scene, regionInfo.RegionHandle, LLUUID.Zero, scene.PrimIDAllocate(), pos, shape);
scene.AddEntity(sceneObject);
MyNpcCharacter m_character = new MyNpcCharacter( scene.EventManager );
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs
index 06c9069935..9c5e4bc3d1 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs
@@ -24,9 +24,9 @@ namespace OpenSim.DataStore.DB4oStorage
globalIDSearch = find;
}
- public bool Match(SceneObject obj)
+ public bool Match(SceneObjectGroup obj)
{
- return obj.rootUUID == globalIDSearch;
+ return obj.UUID == globalIDSearch;
}
}
@@ -43,7 +43,7 @@ namespace OpenSim.DataStore.DB4oStorage
return;
}
- public void StoreObject(SceneObject obj)
+ public void StoreObject(SceneObjectGroup obj)
{
db.Set(obj);
}
@@ -53,21 +53,21 @@ namespace OpenSim.DataStore.DB4oStorage
IObjectSet result = db.Query(new SceneObjectQuery(obj));
if (result.Count > 0)
{
- SceneObject item = (SceneObject)result.Next();
+ SceneObjectGroup item = (SceneObjectGroup)result.Next();
db.Delete(item);
}
}
- public List LoadObjects()
+ public List LoadObjects()
{
- IObjectSet result = db.Get(typeof(SceneObject));
- List retvals = new List();
+ IObjectSet result = db.Get(typeof(SceneObjectGroup));
+ List retvals = new List();
MainLog.Instance.Verbose("DATASTORE", "DB4O - LoadObjects found " + result.Count.ToString() + " objects");
foreach (Object obj in result)
{
- retvals.Add((SceneObject)obj);
+ retvals.Add((SceneObjectGroup)obj);
}
return retvals;
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs
index fc003e8e20..643508e56f 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs
@@ -18,7 +18,7 @@ namespace OpenSim.DataStore.NullStorage
return;
}
- public void StoreObject(SceneObject obj)
+ public void StoreObject(SceneObjectGroup obj)
{
}
@@ -28,9 +28,9 @@ namespace OpenSim.DataStore.NullStorage
}
- public List LoadObjects()
+ public List LoadObjects()
{
- return new List();
+ return new List();
}
public void StoreTerrain(double[,] ter)