diff options
Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs index 81d59a6..f57149c 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs | |||
@@ -5,6 +5,7 @@ | |||
5 | using System; | 5 | using System; |
6 | using System.Threading; | 6 | using System.Threading; |
7 | using System.Collections.Generic; | 7 | using System.Collections.Generic; |
8 | using System.IO; | ||
8 | using System.Reflection; | 9 | using System.Reflection; |
9 | using System.Runtime.InteropServices; | 10 | using System.Runtime.InteropServices; |
10 | using System.Text; | 11 | using System.Text; |
@@ -177,7 +178,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
177 | Vector3 size = psize; | 178 | Vector3 size = psize; |
178 | byte shapetype = pshapetype; | 179 | byte shapetype = pshapetype; |
179 | 180 | ||
180 | if (needsMeshing(pbs) && (pbs.SculptData.Length > 0)) | 181 | if (needsMeshing(pbs)) |
181 | { | 182 | { |
182 | bool convex; | 183 | bool convex; |
183 | int clod = (int)LevelOfDetail.High; | 184 | int clod = (int)LevelOfDetail.High; |
@@ -189,9 +190,24 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
189 | if (pbs.SculptType != (byte)SculptType.Mesh) | 190 | if (pbs.SculptType != (byte)SculptType.Mesh) |
190 | clod = (int)LevelOfDetail.Low; | 191 | clod = (int)LevelOfDetail.Low; |
191 | } | 192 | } |
192 | mesh = m_mesher.CreateMesh(actor.Name, pbs, size, clod, true, convex); | 193 | mesh = m_mesher.GetMesh(actor.Name, pbs, size, clod, true, convex); |
193 | if(mesh == null) | 194 | if (mesh == null) |
194 | mesh = m_mesher.CreateMesh(actor.Name, pbs, size, clod, true, convex); | 195 | { |
196 | if (!pbs.SculptEntry) | ||
197 | return m_mesher.CreateMesh(actor.Name, pbs, size, clod, true, convex); | ||
198 | |||
199 | if (pbs.SculptTexture == UUID.Zero) | ||
200 | return null; | ||
201 | |||
202 | if(pbs.SculptType != (byte)SculptType.Mesh) | ||
203 | { // check for sculpt decoded image on cache) | ||
204 | if (File.Exists(System.IO.Path.Combine("j2kDecodeCache", "smap_" + pbs.SculptTexture.ToString()))) | ||
205 | return m_mesher.CreateMesh(actor.Name, pbs, size, clod, true, convex); | ||
206 | } | ||
207 | |||
208 | if(pbs.SculptData != null && pbs.SculptData.Length >0) | ||
209 | return m_mesher.CreateMesh(actor.Name, pbs, size, clod, true, convex); | ||
210 | } | ||
195 | } | 211 | } |
196 | return mesh; | 212 | return mesh; |
197 | } | 213 | } |