diff options
Diffstat (limited to 'OpenSim/Framework/PrimitiveBaseShape.cs')
-rw-r--r-- | OpenSim/Framework/PrimitiveBaseShape.cs | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index fcc9873..df928dc 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs | |||
@@ -192,18 +192,7 @@ namespace OpenSim.Framework | |||
192 | 192 | ||
193 | public PrimitiveBaseShape() | 193 | public PrimitiveBaseShape() |
194 | { | 194 | { |
195 | PCode = (byte) PCodeEnum.Primitive; | ||
196 | ExtraParams = new byte[1]; | ||
197 | m_textureEntry = DEFAULT_TEXTURE; | ||
198 | } | ||
199 | |||
200 | public PrimitiveBaseShape(bool noShape) | ||
201 | { | ||
202 | if (noShape) | ||
203 | return; | ||
204 | |||
205 | PCode = (byte)PCodeEnum.Primitive; | 195 | PCode = (byte)PCodeEnum.Primitive; |
206 | ExtraParams = new byte[1]; | ||
207 | m_textureEntry = DEFAULT_TEXTURE; | 196 | m_textureEntry = DEFAULT_TEXTURE; |
208 | } | 197 | } |
209 | 198 | ||
@@ -216,7 +205,6 @@ namespace OpenSim.Framework | |||
216 | // m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: Creating from {0}", prim.ID); | 205 | // m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: Creating from {0}", prim.ID); |
217 | 206 | ||
218 | PCode = (byte)prim.PrimData.PCode; | 207 | PCode = (byte)prim.PrimData.PCode; |
219 | ExtraParams = new byte[1]; | ||
220 | 208 | ||
221 | State = prim.PrimData.State; | 209 | State = prim.PrimData.State; |
222 | PathBegin = Primitive.PackBeginCut(prim.PrimData.PathBegin); | 210 | PathBegin = Primitive.PackBeginCut(prim.PrimData.PathBegin); |
@@ -248,7 +236,10 @@ namespace OpenSim.Framework | |||
248 | SculptTexture = prim.Sculpt.SculptTexture; | 236 | SculptTexture = prim.Sculpt.SculptTexture; |
249 | SculptType = (byte)prim.Sculpt.Type; | 237 | SculptType = (byte)prim.Sculpt.Type; |
250 | } | 238 | } |
251 | else SculptType = (byte)OpenMetaverse.SculptType.None; | 239 | else |
240 | { | ||
241 | SculptType = (byte)OpenMetaverse.SculptType.None; | ||
242 | } | ||
252 | } | 243 | } |
253 | 244 | ||
254 | [XmlIgnore] | 245 | [XmlIgnore] |
@@ -340,9 +331,9 @@ namespace OpenSim.Framework | |||
340 | _scale = new Vector3(side, side, side); | 331 | _scale = new Vector3(side, side, side); |
341 | } | 332 | } |
342 | 333 | ||
343 | public void SetHeigth(float heigth) | 334 | public void SetHeigth(float height) |
344 | { | 335 | { |
345 | _scale.Z = heigth; | 336 | _scale.Z = height; |
346 | } | 337 | } |
347 | 338 | ||
348 | public void SetRadius(float radius) | 339 | public void SetRadius(float radius) |
@@ -631,6 +622,8 @@ namespace OpenSim.Framework | |||
631 | } | 622 | } |
632 | } | 623 | } |
633 | 624 | ||
625 | // This is only used at runtime. For sculpties this holds the texture data, and for meshes | ||
626 | // the mesh data. | ||
634 | public byte[] SculptData | 627 | public byte[] SculptData |
635 | { | 628 | { |
636 | get | 629 | get |
@@ -1184,14 +1177,13 @@ namespace OpenSim.Framework | |||
1184 | 1177 | ||
1185 | public void ReadSculptData(byte[] data, int pos) | 1178 | public void ReadSculptData(byte[] data, int pos) |
1186 | { | 1179 | { |
1187 | byte[] SculptTextureUUID = new byte[16]; | 1180 | UUID SculptUUID; |
1188 | UUID SculptUUID = UUID.Zero; | 1181 | byte SculptTypel; |
1189 | byte SculptTypel = data[16+pos]; | ||
1190 | 1182 | ||
1191 | if (data.Length+pos >= 17) | 1183 | if (data.Length-pos >= 17) |
1192 | { | 1184 | { |
1193 | _sculptEntry = true; | 1185 | _sculptEntry = true; |
1194 | SculptTextureUUID = new byte[16]; | 1186 | byte[] SculptTextureUUID = new byte[16]; |
1195 | SculptTypel = data[16 + pos]; | 1187 | SculptTypel = data[16 + pos]; |
1196 | Array.Copy(data, pos, SculptTextureUUID,0, 16); | 1188 | Array.Copy(data, pos, SculptTextureUUID,0, 16); |
1197 | SculptUUID = new UUID(SculptTextureUUID, 0); | 1189 | SculptUUID = new UUID(SculptTextureUUID, 0); |