Replaces constructors of Ray with CollisionRay (#594)

Companion of https://github.com/space-wizards/RobustToolbox/pull/951
This commit is contained in:
Tyler Young
2020-02-06 08:17:37 -05:00
committed by GitHub
parent 57ec3e57dd
commit fcccae5df0
4 changed files with 4 additions and 4 deletions

View File

@@ -126,7 +126,7 @@ namespace Content.Server.AI
for (var i = 0; i < 3; i++) // you get 3 chances to find a place to walk
{
var dir = new Vector2(Random01(ref rngState) * 2 - 1, Random01(ref rngState) *2 -1).Normalized;
var ray = new Ray(entWorldPos, dir, (int) CollisionGroup.Impassable);
var ray = new CollisionRay(entWorldPos, dir, (int) CollisionGroup.Impassable);
var rayResult = _physMan.IntersectRay(SelfEntity.Transform.MapID, ray, MaxWalkDistance, SelfEntity);
if (rayResult.DidHitObject && rayResult.Distance > 1) // hit an impassable object