- doors aren't ignored when checking visibility during waypoint generation or when finding a starting node for a path
- AICharacter will mark their path unreachable if their path is blocked by a door they cant open (may happen if someone closes the door after calculating the path) - fixed exception when creating a Steering component when there's no active GameSession (i.e. in the editor)
This commit is contained in:
@@ -172,7 +172,12 @@ namespace Barotrauma
|
||||
start, node.Waypoint.SimPosition, null,
|
||||
Physics.CollisionWall | Physics.CollisionLevel | Physics.CollisionStairs | Physics.CollisionPlatform);
|
||||
|
||||
if (body != null && body.UserData is Structure && !((Structure)body.UserData).IsPlatform) continue;
|
||||
if (body != null)
|
||||
{
|
||||
if (body.UserData is Structure && !((Structure)body.UserData).IsPlatform) continue;
|
||||
if (body.UserData is Item && body.FixtureList[0].CollisionCategories.HasFlag(Physics.CollisionWall)) continue;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
closestDist = dist;
|
||||
|
||||
Reference in New Issue
Block a user