Sculpted Prims should now work.

This commit is contained in:
MW
2007-07-18 20:29:06 +00:00
parent 643a02ec60
commit d2b459b8e5
9 changed files with 54 additions and 3 deletions

View File

@@ -588,6 +588,24 @@ namespace OpenSim.Region.Environment.Scenes
#endregion
public void UpdateExtraParam(ushort type, bool inUse, byte[] data)
{
this.m_Shape.ExtraParams = new byte[data.Length + 7];
int i =0;
uint length = (uint) data.Length;
this.m_Shape.ExtraParams[i++] = 1;
this.m_Shape.ExtraParams[i++] = (byte)(type % 256);
this.m_Shape.ExtraParams[i++] = (byte)((type >> 8) % 256);
this.m_Shape.ExtraParams[i++] = (byte)(length % 256);
this.m_Shape.ExtraParams[i++] = (byte)((length >> 8) % 256);
this.m_Shape.ExtraParams[i++] = (byte)((length >> 16) % 256);
this.m_Shape.ExtraParams[i++] = (byte)((length >> 24) % 256);
Array.Copy(data, 0, this.m_Shape.ExtraParams, i, data.Length);
this.ScheduleFullUpdate();
}
#region Texture
/// <summary>

View File

@@ -327,6 +327,22 @@ namespace OpenSim.Region.Environment.Scenes
}
}
public void UpdateExtraParam(uint primLocalID, ushort type, bool inUse, byte[] data)
{
Primitive prim = null;
foreach (EntityBase ent in Entities.Values)
{
if (ent is SceneObject)
{
prim = ((SceneObject)ent).HasChildPrim(primLocalID);
if (prim != null)
{
prim.UpdateExtraParam(type, inUse, data);
break;
}
}
}
}
/// <summary>
///
/// </summary>

View File

@@ -548,6 +548,7 @@ namespace OpenSim.Region.Environment.Scenes
client.OnUpdatePrimGroupMouseRotation += UpdatePrimRotation;
client.OnUpdatePrimSingleRotation += UpdatePrimSingleRotation;
client.OnUpdatePrimScale += UpdatePrimScale;
client.OnUpdateExtraParams += UpdateExtraParam;
client.OnUpdatePrimShape += UpdatePrimShape;
client.OnRequestMapBlocks += RequestMapBlocks;
client.OnUpdatePrimTexture += UpdatePrimTexture;