diff options
Can change the name and description of a prim.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObject.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObject.cs | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObject.cs b/OpenSim/Region/Environment/Scenes/SceneObject.cs index a228638..00df447 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObject.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObject.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
39 | { | 39 | { |
40 | public class SceneObject : EntityBase | 40 | public class SceneObject : EntityBase |
41 | { | 41 | { |
42 | 42 | private System.Text.Encoding enc = System.Text.Encoding.ASCII; | |
43 | private Dictionary<LLUUID, Primitive> ChildPrimitives = new Dictionary<LLUUID, Primitive>(); //list of all primitive id's that are part of this group | 43 | private Dictionary<LLUUID, Primitive> ChildPrimitives = new Dictionary<LLUUID, Primitive>(); //list of all primitive id's that are part of this group |
44 | protected Primitive rootPrimitive; | 44 | protected Primitive rootPrimitive; |
45 | private Scene m_world; | 45 | private Scene m_world; |
@@ -114,6 +114,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
114 | return null; | 114 | return null; |
115 | } | 115 | } |
116 | 116 | ||
117 | public Primitive HasChildPrim(uint localID) | ||
118 | { | ||
119 | Primitive returnPrim = null; | ||
120 | foreach (Primitive prim in this.children) | ||
121 | { | ||
122 | if (prim.LocalId == localID) | ||
123 | { | ||
124 | returnPrim = prim; | ||
125 | break; | ||
126 | } | ||
127 | } | ||
128 | return returnPrim; | ||
129 | } | ||
117 | 130 | ||
118 | /// <summary> | 131 | /// <summary> |
119 | /// | 132 | /// |
@@ -141,6 +154,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
141 | /// <param name="client"></param> | 154 | /// <param name="client"></param> |
142 | public void GetProperites(IClientAPI client) | 155 | public void GetProperites(IClientAPI client) |
143 | { | 156 | { |
157 | |||
144 | //needs changing | 158 | //needs changing |
145 | ObjectPropertiesPacket proper = new ObjectPropertiesPacket(); | 159 | ObjectPropertiesPacket proper = new ObjectPropertiesPacket(); |
146 | proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1]; | 160 | proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1]; |
@@ -158,8 +172,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
158 | proper.ObjectData[0].TouchName = new byte[0]; | 172 | proper.ObjectData[0].TouchName = new byte[0]; |
159 | proper.ObjectData[0].TextureID = new byte[0]; | 173 | proper.ObjectData[0].TextureID = new byte[0]; |
160 | proper.ObjectData[0].SitName = new byte[0]; | 174 | proper.ObjectData[0].SitName = new byte[0]; |
161 | proper.ObjectData[0].Name = new byte[0]; | 175 | proper.ObjectData[0].Name = enc.GetBytes(this.rootPrimitive.Name +"\0"); |
162 | proper.ObjectData[0].Description = new byte[0]; | 176 | proper.ObjectData[0].Description = enc.GetBytes(this.rootPrimitive.Description +"\0"); |
163 | proper.ObjectData[0].OwnerMask = this.rootPrimitive.OwnerMask; | 177 | proper.ObjectData[0].OwnerMask = this.rootPrimitive.OwnerMask; |
164 | proper.ObjectData[0].NextOwnerMask = this.rootPrimitive.NextOwnerMask; | 178 | proper.ObjectData[0].NextOwnerMask = this.rootPrimitive.NextOwnerMask; |
165 | proper.ObjectData[0].GroupMask = this.rootPrimitive.GroupMask; | 179 | proper.ObjectData[0].GroupMask = this.rootPrimitive.GroupMask; |