Fix a type (Suports => Supports). Also put the normal terrain collision check

into the physics check patch for now since physics doesn't properly return land for some reason (as tested by Nebadon)
avinationmerge
Melanie 2013-01-23 20:29:05 +01:00
parent 47f18caa22
commit c75508ec8d
4 changed files with 12 additions and 12 deletions

View File

@ -2065,11 +2065,11 @@ namespace OpenSim.Region.Framework.Scenes
EventManager.TriggerPrimsLoaded(this); EventManager.TriggerPrimsLoaded(this);
} }
public bool SuportsRayCastFiltered() public bool SupportsRayCastFiltered()
{ {
if (PhysicsScene == null) if (PhysicsScene == null)
return false; return false;
return PhysicsScene.SuportsRaycastWorldFiltered(); return PhysicsScene.SupportsRaycastWorldFiltered();
} }
public object RayCastFiltered(Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags filter) public object RayCastFiltered(Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags filter)

View File

@ -350,7 +350,7 @@ namespace OpenSim.Region.Physics.Manager
return null; return null;
} }
public virtual bool SuportsRaycastWorldFiltered() public virtual bool SupportsRaycastWorldFiltered()
{ {
return false; return false;
} }

View File

@ -2643,7 +2643,7 @@ namespace OpenSim.Region.Physics.OdePlugin
} }
} }
public override bool SuportsRaycastWorldFiltered() public override bool SupportsRaycastWorldFiltered()
{ {
return true; return true;
} }

View File

@ -12209,7 +12209,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
bool checkPhysical = !((rejectTypes & ScriptBaseClass.RC_REJECT_PHYSICAL) == ScriptBaseClass.RC_REJECT_PHYSICAL); bool checkPhysical = !((rejectTypes & ScriptBaseClass.RC_REJECT_PHYSICAL) == ScriptBaseClass.RC_REJECT_PHYSICAL);
if (World.SuportsRayCastFiltered()) if (World.SupportsRayCastFiltered())
{ {
if (dist == 0) if (dist == 0)
return list; return list;
@ -12272,13 +12272,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
else else
{ {
if (checkTerrain)
{
ContactResult? groundContact = GroundIntersection(rayStart, rayEnd);
if (groundContact != null)
results.Add((ContactResult)groundContact);
}
if (checkAgents) if (checkAgents)
{ {
ContactResult[] agentHits = AvatarIntersection(rayStart, rayEnd); ContactResult[] agentHits = AvatarIntersection(rayStart, rayEnd);
@ -12294,6 +12287,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
} }
if (checkTerrain)
{
ContactResult? groundContact = GroundIntersection(rayStart, rayEnd);
if (groundContact != null)
results.Add((ContactResult)groundContact);
}
results.Sort(delegate(ContactResult a, ContactResult b) results.Sort(delegate(ContactResult a, ContactResult b)
{ {
return a.Depth.CompareTo(b.Depth); return a.Depth.CompareTo(b.Depth);