minor POS tweak for speed

afrisby
dan miller 2007-11-17 22:43:05 +00:00
parent 54df1a57d7
commit 7c18c69668
1 changed files with 4 additions and 5 deletions

View File

@ -135,20 +135,19 @@ namespace OpenSim.Region.Physics.POSPlugin
" absX: " + Math.Abs(p.Position.X - c.Position.X) +
" sizeX: " + p.Size.X * 0.5 + 0.5);
*/
bool collides = true;
if (Math.Abs(p.Position.X - c.Position.X) >= (p.Size.X * 0.5 + 0.5))
{
collides = false;
return false;
}
if (Math.Abs(p.Position.Y - c.Position.Y) >= (p.Size.Y * 0.5 + 0.5))
{
collides = false;
return false;
}
if (Math.Abs(p.Position.Z - c.Position.Z) >= (p.Size.Z * 0.5 + 1.0))
{
collides = false;
return false;
}
return collides;
return true;
}
public override void Simulate(float timeStep)