From 60cebe9a5b91f2683019d645f6bb243a9f7db139 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Mon, 28 May 2012 14:32:16 +0100
Subject: let meshs work indenpendently of mesh_sculpted_prim config option
---
OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | 54 +++++++++++-------------
1 file changed, 25 insertions(+), 29 deletions(-)
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
index d5968fc..b0bc18b 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
@@ -1675,41 +1675,43 @@ namespace OpenSim.Region.Physics.OdePlugin
///
public bool needsMeshing(PrimitiveBaseShape pbs)
{
- // most of this is redundant now as the mesher will return null if it cant mesh a prim
- // but we still need to check for sculptie meshing being enabled so this is the most
- // convenient place to do it for now...
-
- // //if (pbs.PathCurve == (byte)Primitive.PathCurve.Circle && pbs.ProfileCurve == (byte)Primitive.ProfileCurve.Circle && pbs.PathScaleY <= 0.75f)
- // //m_log.Debug("needsMeshing: " + " pathCurve: " + pbs.PathCurve.ToString() + " profileCurve: " + pbs.ProfileCurve.ToString() + " pathScaleY: " + Primitive.UnpackPathScale(pbs.PathScaleY).ToString());
- int iPropertiesNotSupportedDefault = 0;
+ // check sculpts or meshs
if (pbs.SculptEntry)
{
- if(!meshSculptedPrim)
+ if (pbs.SculptType == (byte)SculptType.Mesh) // always do meshs
+ return true;
+
+ if (!meshSculptedPrim)
return false;
+ else
+ return true;
}
+ int iPropertiesNotSupportedDefault = 0;
+
+ if (forceSimplePrimMeshing)
+ return true;
+
// if it's a standard box or sphere with no cuts, hollows, twist or top shear, return false since ODE can use an internal representation for the prim
- if (!forceSimplePrimMeshing && !pbs.SculptEntry)
- {
- if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight)
+
+ if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight)
|| (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1
&& pbs.Scale.X == pbs.Scale.Y && pbs.Scale.Y == pbs.Scale.Z))
- {
+ {
- if (pbs.ProfileBegin == 0 && pbs.ProfileEnd == 0
- && pbs.ProfileHollow == 0
- && pbs.PathTwist == 0 && pbs.PathTwistBegin == 0
- && pbs.PathBegin == 0 && pbs.PathEnd == 0
- && pbs.PathTaperX == 0 && pbs.PathTaperY == 0
- && pbs.PathScaleX == 100 && pbs.PathScaleY == 100
- && pbs.PathShearX == 0 && pbs.PathShearY == 0)
- {
+ if (pbs.ProfileBegin == 0 && pbs.ProfileEnd == 0
+ && pbs.ProfileHollow == 0
+ && pbs.PathTwist == 0 && pbs.PathTwistBegin == 0
+ && pbs.PathBegin == 0 && pbs.PathEnd == 0
+ && pbs.PathTaperX == 0 && pbs.PathTaperY == 0
+ && pbs.PathScaleX == 100 && pbs.PathScaleY == 100
+ && pbs.PathShearX == 0 && pbs.PathShearY == 0)
+ {
#if SPAM
- m_log.Warn("NonMesh");
+ m_log.Warn("NonMesh");
#endif
- return false;
- }
+ return false;
}
}
@@ -1717,9 +1719,6 @@ namespace OpenSim.Region.Physics.OdePlugin
// and it's odd.. so for now just return true if asked to force meshs
// hopefully mesher will fail if doesn't suport so things still get basic boxes
- if (forceSimplePrimMeshing)
- return true;
-
if (pbs.ProfileHollow != 0)
iPropertiesNotSupportedDefault++;
@@ -1787,9 +1786,6 @@ namespace OpenSim.Region.Physics.OdePlugin
}
}
- if (pbs.SculptEntry && meshSculptedPrim)
- iPropertiesNotSupportedDefault++;
-
if (iPropertiesNotSupportedDefault == 0)
{
#if SPAM
--
cgit v1.1
From 2122c336b088ebb2900cf6cd061602dda01268e0 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Mon, 28 May 2012 14:44:06 +0100
Subject: a bit cleaner code (?) on sculpts/meshs meshing checking
---
OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
index b0bc18b..286c7f0 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
@@ -1675,20 +1675,17 @@ namespace OpenSim.Region.Physics.OdePlugin
///
public bool needsMeshing(PrimitiveBaseShape pbs)
{
-
// check sculpts or meshs
if (pbs.SculptEntry)
{
- if (pbs.SculptType == (byte)SculptType.Mesh) // always do meshs
+ if (meshSculptedPrim)
return true;
- if (!meshSculptedPrim)
- return false;
- else
+ if (pbs.SculptType == (byte)SculptType.Mesh) // always do meshs
return true;
- }
- int iPropertiesNotSupportedDefault = 0;
+ return false;
+ }
if (forceSimplePrimMeshing)
return true;
@@ -1719,6 +1716,8 @@ namespace OpenSim.Region.Physics.OdePlugin
// and it's odd.. so for now just return true if asked to force meshs
// hopefully mesher will fail if doesn't suport so things still get basic boxes
+ int iPropertiesNotSupportedDefault = 0;
+
if (pbs.ProfileHollow != 0)
iPropertiesNotSupportedDefault++;
--
cgit v1.1
From dbbfe0cdd78c919b39da52e1ccc0c1fc500b57d5 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Mon, 28 May 2012 22:23:32 +0100
Subject: fix avatars collisions on sim crossings and other few cases where
freemove() is called
---
OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
index 6fb54cb..093bc3c 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
@@ -1322,8 +1322,7 @@ namespace OpenSim.Region.Physics.OdePlugin
m_iscollidingGround = false;
m_iscollidingObj = false;
- CollisionEventsThisFrame = new CollisionEventUpdate();
- m_eventsubscription = 0;
+ CollisionEventsThisFrame.Clear();
}
private void changeForce(Vector3 newForce)
--
cgit v1.1