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;
|
||||
}
|
||||
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();
|
||||
Quaternion rotation = inner_instance_list["rotation"].AsQuaternion();
|
||||
|
|
|
@ -3883,15 +3883,15 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
if (Shape.SculptEntry && !ignoreSculpt)
|
||||
return PrimType.SCULPT;
|
||||
|
||||
if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.Square)
|
||||
ProfileShape ps = (ProfileShape)(Shape.ProfileCurve & 0x07);
|
||||
if (ps == ProfileShape.Square)
|
||||
{
|
||||
if (Shape.PathCurve == (byte)Extrusion.Straight)
|
||||
return PrimType.BOX;
|
||||
else if (Shape.PathCurve == (byte)Extrusion.Curve1)
|
||||
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)
|
||||
return PrimType.CYLINDER;
|
||||
|
@ -3899,12 +3899,12 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
else if (Shape.PathCurve == (byte)Extrusion.Curve1)
|
||||
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)
|
||||
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)
|
||||
return PrimType.PRISM;
|
||||
|
@ -5124,7 +5124,13 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
if (changeFlags == 0)
|
||||
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);
|
||||
ParentGroup.HasGroupChanged = true;
|
||||
ScheduleUpdate(PrimUpdateFlags.Textures);
|
||||
|
|
Loading…
Reference in New Issue