POS physics: removed "stickiness" from avatars so they can slide along surfaces instead of sticking to them.
parent
61bc26226f
commit
26909477fc
|
@ -179,7 +179,15 @@ namespace OpenSim.Region.Physics.POSPlugin
|
||||||
|
|
||||||
bool forcedZ = false;
|
bool forcedZ = false;
|
||||||
character.Position.X = character.Position.X + (character._target_velocity.X * timeStep);
|
character.Position.X = character.Position.X + (character._target_velocity.X * timeStep);
|
||||||
|
if (check_all_prims(character))
|
||||||
|
{
|
||||||
|
character.Position.X = oldposX;
|
||||||
|
}
|
||||||
character.Position.Y = character.Position.Y + (character._target_velocity.Y * timeStep);
|
character.Position.Y = character.Position.Y + (character._target_velocity.Y * timeStep);
|
||||||
|
if (check_all_prims(character))
|
||||||
|
{
|
||||||
|
character.Position.Y = oldposY;
|
||||||
|
}
|
||||||
float terrainheight = _heightMap[(int)character.Position.Y * 256 + (int)character.Position.X];
|
float terrainheight = _heightMap[(int)character.Position.Y * 256 + (int)character.Position.X];
|
||||||
if (character.Position.Z + (character._target_velocity.Z * timeStep) < terrainheight + 2)
|
if (character.Position.Z + (character._target_velocity.Z * timeStep) < terrainheight + 2)
|
||||||
{
|
{
|
||||||
|
@ -201,16 +209,6 @@ namespace OpenSim.Region.Physics.POSPlugin
|
||||||
if (check_all_prims(character))
|
if (check_all_prims(character))
|
||||||
{
|
{
|
||||||
character.Position.Z = oldposZ + 0.4f; // try harder
|
character.Position.Z = oldposZ + 0.4f; // try harder
|
||||||
if (check_all_prims(character))
|
|
||||||
{
|
|
||||||
character.Position.X = oldposX;
|
|
||||||
character.Position.Y = oldposY;
|
|
||||||
character.Position.Z = oldposZ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
forcedZ = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue