Merge branch 'ubitworkmaster'

avinationmerge
Melanie Thielker 2014-10-12 19:45:46 +02:00
commit 47fdd7f91a
2 changed files with 26 additions and 30 deletions

View File

@ -131,8 +131,6 @@ namespace OpenSim.Region.ClientStack.Linden
m_features["MeshRezEnabled"] = true; m_features["MeshRezEnabled"] = true;
m_features["MeshUploadEnabled"] = true; m_features["MeshUploadEnabled"] = true;
m_features["MeshXferEnabled"] = true; m_features["MeshXferEnabled"] = true;
m_features["AvatarSkeleton"] = true;
m_features["AnimationSet"] = true;
m_features["PhysicsMaterialsEnabled"] = true; m_features["PhysicsMaterialsEnabled"] = true;
@ -143,14 +141,18 @@ namespace OpenSim.Region.ClientStack.Linden
m_features["PhysicsShapeTypes"] = typesMap; m_features["PhysicsShapeTypes"] = typesMap;
// Extra information for viewers that want to use it // Extra information for viewers that want to use it
// TODO: Take these out of here into their respective modules, like map-server-url
OSDMap extrasMap = new OSDMap(); OSDMap extrasMap = new OSDMap();
extrasMap["AvatarSkeleton"] = true;
extrasMap["AnimationSet"] = true;
// TODO: Take these out of here into their respective modules, like map-server-url
if (m_SearchURL != string.Empty) if (m_SearchURL != string.Empty)
extrasMap["search-server-url"] = m_SearchURL; extrasMap["search-server-url"] = m_SearchURL;
if (m_ExportSupported) if (m_ExportSupported)
extrasMap["ExportSupported"] = true; extrasMap["ExportSupported"] = true;
if (extrasMap.Count > 0)
m_features["OpenSimExtras"] = extrasMap; m_features["OpenSimExtras"] = extrasMap;
} }

View File

@ -311,9 +311,9 @@ namespace OpenSim.Region.Physics.OdePlugin
{ {
if (value) if (value)
{ {
m_colliderfilter += 2; m_colliderfilter += 3;
if (m_colliderfilter > 2) if (m_colliderfilter > 3)
m_colliderfilter = 2; m_colliderfilter = 3;
} }
else else
{ {
@ -328,6 +328,7 @@ namespace OpenSim.Region.Physics.OdePlugin
{ {
m_pidControllerActive = true; m_pidControllerActive = true;
m_iscolliding = true; m_iscolliding = true;
m_freemove = false;
} }
} }
} }
@ -928,19 +929,6 @@ namespace OpenSim.Region.Physics.OdePlugin
IsColliding = true; IsColliding = true;
} }
} }
/*
if (contact.normal.Z < 0.2f)
{
contact.normal.Z = 0;
float t = contact.normal.X * contact.normal.X + contact.normal.Y * contact.normal.Y;
if (t > 0)
{
t = 1.0f / t;
contact.normal.X *= t;
contact.normal.Y *= t;
}
}
*/
return true; return true;
} }
@ -1204,12 +1192,18 @@ namespace OpenSim.Region.Physics.OdePlugin
// Avatar to Avatar collisions // Avatar to Avatar collisions
// Prim to avatar collisions // Prim to avatar collisions
vec.X = -vel.X * PID_D + (_zeroPosition.X - localpos.X) * (PID_P * 5); vec.X = -vel.X * PID_D * 2f + (_zeroPosition.X - localpos.X) * (PID_P * 5);
vec.Y = -vel.Y * PID_D + (_zeroPosition.Y - localpos.Y) * (PID_P * 5); vec.Y = -vel.Y * PID_D * 2f + (_zeroPosition.Y - localpos.Y) * (PID_P * 5);
if(vel.Z > 0)
vec.Z += -vel.Z * PID_D + (_zeroPosition.Z - localpos.Z) * PID_P;
else
vec.Z += (-vel.Z * PID_D + (_zeroPosition.Z - localpos.Z) * PID_P) * 0.2f;
/*
if (flying) if (flying)
{ {
vec.Z += -vel.Z * PID_D + (_zeroPosition.Z - localpos.Z) * PID_P; vec.Z += -vel.Z * PID_D + (_zeroPosition.Z - localpos.Z) * PID_P;
} }
*/
} }
//PidStatus = true; //PidStatus = true;
} }
@ -1226,7 +1220,7 @@ namespace OpenSim.Region.Physics.OdePlugin
if (ctz.Z > 0f) if (ctz.Z > 0f)
{ {
// moving up or JUMPING // moving up or JUMPING
vec.Z += (ctz.Z - vel.Z) * PID_D; vec.Z += (ctz.Z - vel.Z) * PID_D * 2f;
vec.X += (ctz.X - vel.X) * (PID_D); vec.X += (ctz.X - vel.X) * (PID_D);
vec.Y += (ctz.Y - vel.Y) * (PID_D); vec.Y += (ctz.Y - vel.Y) * (PID_D);
} }
@ -1236,7 +1230,7 @@ namespace OpenSim.Region.Physics.OdePlugin
if (ctz.Z == 0) if (ctz.Z == 0)
{ {
if (vel.Z > 0) if (vel.Z > 0)
vec.Z -= vel.Z * PID_D; vec.Z -= vel.Z * PID_D * 2f;
vec.X += (ctz.X - vel.X) * (PID_D); vec.X += (ctz.X - vel.X) * (PID_D);
vec.Y += (ctz.Y - vel.Y) * (PID_D); vec.Y += (ctz.Y - vel.Y) * (PID_D);
} }
@ -1305,9 +1299,9 @@ namespace OpenSim.Region.Physics.OdePlugin
vec.X -= breakfactor * vel.X; vec.X -= breakfactor * vel.X;
vec.Y -= breakfactor * vel.Y; vec.Y -= breakfactor * vel.Y;
if (flying) if (flying)
vec.Z -= breakfactor * vel.Z; vec.Z -= 0.5f * breakfactor * vel.Z;
else else
vec.Z -= .5f* m_mass * vel.Z; vec.Z -= .16f* m_mass * vel.Z;
} }
if (flying) if (flying)
@ -1687,9 +1681,9 @@ namespace OpenSim.Region.Physics.OdePlugin
_zeroFlag = false; _zeroFlag = false;
_target_velocity = Vector3.Zero; _target_velocity = Vector3.Zero;
m_freemove = true; m_freemove = true;
m_colliderfilter = -2; m_colliderfilter = -1;
m_colliderObjectfilter = -2; m_colliderObjectfilter = -1;
m_colliderGroundfilter = -2; m_colliderGroundfilter = -1;
m_iscolliding = false; m_iscolliding = false;
m_iscollidingGround = false; m_iscollidingGround = false;