mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
compact the trivial te case, a more complete one may be needed even beening heavy
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user