mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Sculpted Prims should now work.
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user