diff options
author | UbitUmarov | 2019-03-24 00:35:30 +0000 |
---|---|---|
committer | UbitUmarov | 2019-03-24 00:35:30 +0000 |
commit | 027750e98ff40b87d774dc6ad4700969b3714087 (patch) | |
tree | d2f95272dd7e8d48fbbb06c8341b8de104a36224 /OpenSim | |
parent | mantis 8506: parse highlod mesh and compare its number of prim faces to the n... (diff) | |
download | opensim-SC-027750e98ff40b87d774dc6ad4700969b3714087.zip opensim-SC-027750e98ff40b87d774dc6ad4700969b3714087.tar.gz opensim-SC-027750e98ff40b87d774dc6ad4700969b3714087.tar.bz2 opensim-SC-027750e98ff40b87d774dc6ad4700969b3714087.tar.xz |
compact the trivial te case, a more complete one may be needed even beening heavy
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 18 |
2 files changed, 21 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 92f5a2c..16178e6 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -1012,7 +1012,15 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1012 | 1012 | ||
1013 | textureEntry.FaceTextures[face] = f; | 1013 | textureEntry.FaceTextures[face] = f; |
1014 | } | 1014 | } |
1015 | pbs.TextureEntry = textureEntry.GetBytes(); | 1015 | |
1016 | if(face_list.Count > 0) | ||
1017 | { | ||
1018 | int last = face_list.Count - 1; | ||
1019 | // we do need a better te compacting code | ||
1020 | textureEntry.DefaultTexture = textureEntry.FaceTextures[last]; | ||
1021 | textureEntry.FaceTextures[last] = null; | ||
1022 | pbs.TextureEntry = textureEntry.GetBytes(last); | ||
1023 | } | ||
1016 | 1024 | ||
1017 | Vector3 position = inner_instance_list["position"].AsVector3(); | 1025 | Vector3 position = inner_instance_list["position"].AsVector3(); |
1018 | Quaternion rotation = inner_instance_list["rotation"].AsQuaternion(); | 1026 | Quaternion rotation = inner_instance_list["rotation"].AsQuaternion(); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index ebb8eda..5e2204e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -3883,15 +3883,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
3883 | { | 3883 | { |
3884 | if (Shape.SculptEntry && !ignoreSculpt) | 3884 | if (Shape.SculptEntry && !ignoreSculpt) |
3885 | return PrimType.SCULPT; | 3885 | return PrimType.SCULPT; |
3886 | 3886 | ProfileShape ps = (ProfileShape)(Shape.ProfileCurve & 0x07); | |
3887 | if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.Square) | 3887 | if (ps == ProfileShape.Square) |
3888 | { | 3888 | { |
3889 | if (Shape.PathCurve == (byte)Extrusion.Straight) | 3889 | if (Shape.PathCurve == (byte)Extrusion.Straight) |
3890 | return PrimType.BOX; | 3890 | return PrimType.BOX; |
3891 | else if (Shape.PathCurve == (byte)Extrusion.Curve1) | 3891 | else if (Shape.PathCurve == (byte)Extrusion.Curve1) |
3892 | return PrimType.TUBE; | 3892 | return PrimType.TUBE; |
3893 | } | 3893 | } |
3894 | else if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.Circle) | 3894 | else if (ps == ProfileShape.Circle) |
3895 | { | 3895 | { |
3896 | if (Shape.PathCurve == (byte)Extrusion.Straight || Shape.PathCurve == (byte)Extrusion.Flexible) | 3896 | if (Shape.PathCurve == (byte)Extrusion.Straight || Shape.PathCurve == (byte)Extrusion.Flexible) |
3897 | return PrimType.CYLINDER; | 3897 | return PrimType.CYLINDER; |
@@ -3899,12 +3899,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
3899 | else if (Shape.PathCurve == (byte)Extrusion.Curve1) | 3899 | else if (Shape.PathCurve == (byte)Extrusion.Curve1) |
3900 | return PrimType.TORUS; | 3900 | return PrimType.TORUS; |
3901 | } | 3901 | } |
3902 | else if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.HalfCircle) | 3902 | else if (ps == ProfileShape.HalfCircle) |
3903 | { | 3903 | { |
3904 | if (Shape.PathCurve == (byte)Extrusion.Curve1 || Shape.PathCurve == (byte)Extrusion.Curve2) | 3904 | if (Shape.PathCurve == (byte)Extrusion.Curve1 || Shape.PathCurve == (byte)Extrusion.Curve2) |
3905 | return PrimType.SPHERE; | 3905 | return PrimType.SPHERE; |
3906 | } | 3906 | } |
3907 | else if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.EquilateralTriangle) | 3907 | else if (ps == ProfileShape.EquilateralTriangle) |
3908 | { | 3908 | { |
3909 | if (Shape.PathCurve == (byte)Extrusion.Straight || Shape.PathCurve == (byte)Extrusion.Flexible) | 3909 | if (Shape.PathCurve == (byte)Extrusion.Straight || Shape.PathCurve == (byte)Extrusion.Flexible) |
3910 | return PrimType.PRISM; | 3910 | return PrimType.PRISM; |
@@ -5124,7 +5124,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
5124 | 5124 | ||
5125 | if (changeFlags == 0) | 5125 | if (changeFlags == 0) |
5126 | return; | 5126 | return; |
5127 | m_shape.TextureEntry = newTex.GetBytes(9); | 5127 | // we do need better compacter do just the trivial case |
5128 | if(nsides == 1 && newTex.FaceTextures[0] != null) | ||
5129 | { | ||
5130 | newTex.DefaultTexture = newTex.GetFace(0); | ||
5131 | newTex.FaceTextures[0] = null; | ||
5132 | } | ||
5133 | m_shape.TextureEntry = newTex.GetBytes(nsides); | ||
5128 | TriggerScriptChangedEvent(changeFlags); | 5134 | TriggerScriptChangedEvent(changeFlags); |
5129 | ParentGroup.HasGroupChanged = true; | 5135 | ParentGroup.HasGroupChanged = true; |
5130 | ScheduleUpdate(PrimUpdateFlags.Textures); | 5136 | ScheduleUpdate(PrimUpdateFlags.Textures); |