mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
Merge branch 'master' into careminster
This commit is contained in:
@@ -2185,9 +2185,30 @@ Console.WriteLine(" JointCreateFixed");
|
||||
if (IsPhysical)
|
||||
{
|
||||
Vector3 iforce = Vector3.Zero;
|
||||
for (int i = 0; i < m_forcelist.Count; i++)
|
||||
int i = 0;
|
||||
try
|
||||
{
|
||||
iforce = iforce + (m_forcelist[i] * 100);
|
||||
for (i = 0; i < m_forcelist.Count; i++)
|
||||
{
|
||||
|
||||
iforce = iforce + (m_forcelist[i] * 100);
|
||||
}
|
||||
}
|
||||
catch (IndexOutOfRangeException)
|
||||
{
|
||||
m_forcelist = new List<Vector3>();
|
||||
m_collisionscore = 0;
|
||||
m_interpenetrationcount = 0;
|
||||
m_taintforce = false;
|
||||
return;
|
||||
}
|
||||
catch (ArgumentOutOfRangeException)
|
||||
{
|
||||
m_forcelist = new List<Vector3>();
|
||||
m_collisionscore = 0;
|
||||
m_interpenetrationcount = 0;
|
||||
m_taintforce = false;
|
||||
return;
|
||||
}
|
||||
d.BodyEnable(Body);
|
||||
d.BodyAddForce(Body, iforce.X, iforce.Y, iforce.Z);
|
||||
@@ -2521,7 +2542,9 @@ Console.WriteLine(" JointCreateFixed");
|
||||
{
|
||||
if (force.IsFinite())
|
||||
{
|
||||
m_forcelist.Add(force);
|
||||
lock (m_forcelist)
|
||||
m_forcelist.Add(force);
|
||||
|
||||
m_taintforce = true;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -835,7 +835,18 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||
// allows us to have different settings
|
||||
|
||||
// We only need to test p2 for 'jump crouch purposes'
|
||||
p2.IsColliding = true;
|
||||
if (p2 is OdeCharacter)
|
||||
{
|
||||
// Testing if the collision is at the feet of the avatar
|
||||
|
||||
//m_log.DebugFormat("[PHYSICS]: {0} - {1} - {2} - {3}", curContact.pos.Z, p2.Position.Z, (p2.Position.Z - curContact.pos.Z), (p2.Size.Z * 0.6f));
|
||||
if ((p2.Position.Z - curContact.pos.Z) > (p2.Size.Z * 0.6f))
|
||||
p2.IsColliding = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
p2.IsColliding = true;
|
||||
}
|
||||
|
||||
//if ((framecount % m_returncollisions) == 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user