compact the trivial te case, a more complete one may be needed even beening heavy
parent
33986aea5e
commit
027750e98f
|
@ -1012,7 +1012,15 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
|
|
||||||
textureEntry.FaceTextures[face] = f;
|
textureEntry.FaceTextures[face] = f;
|
||||||
}
|
}
|
||||||
pbs.TextureEntry = textureEntry.GetBytes();
|
|
||||||
|
if(face_list.Count > 0)
|
||||||
|
{
|
||||||
|
int last = face_list.Count - 1;
|
||||||
|
// we do need a better te compacting code
|
||||||
|
textureEntry.DefaultTexture = textureEntry.FaceTextures[last];
|
||||||
|
textureEntry.FaceTextures[last] = null;
|
||||||
|
pbs.TextureEntry = textureEntry.GetBytes(last);
|
||||||
|
}
|
||||||
|
|
||||||
Vector3 position = inner_instance_list["position"].AsVector3();
|
Vector3 position = inner_instance_list["position"].AsVector3();
|
||||||
Quaternion rotation = inner_instance_list["rotation"].AsQuaternion();
|
Quaternion rotation = inner_instance_list["rotation"].AsQuaternion();
|
||||||
|
|
|
@ -3883,15 +3883,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
if (Shape.SculptEntry && !ignoreSculpt)
|
if (Shape.SculptEntry && !ignoreSculpt)
|
||||||
return PrimType.SCULPT;
|
return PrimType.SCULPT;
|
||||||
|
ProfileShape ps = (ProfileShape)(Shape.ProfileCurve & 0x07);
|
||||||
if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.Square)
|
if (ps == ProfileShape.Square)
|
||||||
{
|
{
|
||||||
if (Shape.PathCurve == (byte)Extrusion.Straight)
|
if (Shape.PathCurve == (byte)Extrusion.Straight)
|
||||||
return PrimType.BOX;
|
return PrimType.BOX;
|
||||||
else if (Shape.PathCurve == (byte)Extrusion.Curve1)
|
else if (Shape.PathCurve == (byte)Extrusion.Curve1)
|
||||||
return PrimType.TUBE;
|
return PrimType.TUBE;
|
||||||
}
|
}
|
||||||
else if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.Circle)
|
else if (ps == ProfileShape.Circle)
|
||||||
{
|
{
|
||||||
if (Shape.PathCurve == (byte)Extrusion.Straight || Shape.PathCurve == (byte)Extrusion.Flexible)
|
if (Shape.PathCurve == (byte)Extrusion.Straight || Shape.PathCurve == (byte)Extrusion.Flexible)
|
||||||
return PrimType.CYLINDER;
|
return PrimType.CYLINDER;
|
||||||
|
@ -3899,12 +3899,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
else if (Shape.PathCurve == (byte)Extrusion.Curve1)
|
else if (Shape.PathCurve == (byte)Extrusion.Curve1)
|
||||||
return PrimType.TORUS;
|
return PrimType.TORUS;
|
||||||
}
|
}
|
||||||
else if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.HalfCircle)
|
else if (ps == ProfileShape.HalfCircle)
|
||||||
{
|
{
|
||||||
if (Shape.PathCurve == (byte)Extrusion.Curve1 || Shape.PathCurve == (byte)Extrusion.Curve2)
|
if (Shape.PathCurve == (byte)Extrusion.Curve1 || Shape.PathCurve == (byte)Extrusion.Curve2)
|
||||||
return PrimType.SPHERE;
|
return PrimType.SPHERE;
|
||||||
}
|
}
|
||||||
else if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.EquilateralTriangle)
|
else if (ps == ProfileShape.EquilateralTriangle)
|
||||||
{
|
{
|
||||||
if (Shape.PathCurve == (byte)Extrusion.Straight || Shape.PathCurve == (byte)Extrusion.Flexible)
|
if (Shape.PathCurve == (byte)Extrusion.Straight || Shape.PathCurve == (byte)Extrusion.Flexible)
|
||||||
return PrimType.PRISM;
|
return PrimType.PRISM;
|
||||||
|
@ -5124,7 +5124,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (changeFlags == 0)
|
if (changeFlags == 0)
|
||||||
return;
|
return;
|
||||||
m_shape.TextureEntry = newTex.GetBytes(9);
|
// we do need better compacter do just the trivial case
|
||||||
|
if(nsides == 1 && newTex.FaceTextures[0] != null)
|
||||||
|
{
|
||||||
|
newTex.DefaultTexture = newTex.GetFace(0);
|
||||||
|
newTex.FaceTextures[0] = null;
|
||||||
|
}
|
||||||
|
m_shape.TextureEntry = newTex.GetBytes(nsides);
|
||||||
TriggerScriptChangedEvent(changeFlags);
|
TriggerScriptChangedEvent(changeFlags);
|
||||||
ParentGroup.HasGroupChanged = true;
|
ParentGroup.HasGroupChanged = true;
|
||||||
ScheduleUpdate(PrimUpdateFlags.Textures);
|
ScheduleUpdate(PrimUpdateFlags.Textures);
|
||||||
|
|
Loading…
Reference in New Issue