Merge remote-tracking branch 'barotrauma/master' into new-netcode
# Conflicts: # Subsurface/Source/Characters/Character.cs # Subsurface/Source/Items/Components/Machines/Steering.cs # Subsurface/Source/Map/Structure.cs # Subsurface/Source/Networking/GameClient.cs # Subsurface/Source/Networking/GameServer.cs
This commit is contained in:
@@ -185,6 +185,11 @@ namespace Barotrauma
|
||||
new Vector2(pathSteering.CurrentPath.Nodes[i].DrawPosition.X, -pathSteering.CurrentPath.Nodes[i].DrawPosition.Y),
|
||||
new Vector2(pathSteering.CurrentPath.Nodes[i - 1].DrawPosition.X, -pathSteering.CurrentPath.Nodes[i - 1].DrawPosition.Y),
|
||||
Color.LightGreen);
|
||||
|
||||
spriteBatch.DrawString(GUI.SmallFont,
|
||||
pathSteering.CurrentPath.Nodes[i].ID.ToString(),
|
||||
new Vector2(pathSteering.CurrentPath.Nodes[i].DrawPosition.X, -pathSteering.CurrentPath.Nodes[i].DrawPosition.Y - 10),
|
||||
Color.LightGreen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace Barotrauma
|
||||
diff.Y = 0.0f;
|
||||
}
|
||||
|
||||
if (diff == Vector2.Zero) return -host.Steering;
|
||||
if (diff.Length() < 0.01) return -host.Steering;
|
||||
|
||||
return Vector2.Normalize(diff) * speed;
|
||||
}
|
||||
@@ -258,6 +258,12 @@ namespace Barotrauma
|
||||
|
||||
if (closestButton != null)
|
||||
{
|
||||
if (!closestButton.HasRequiredItems(character, false) && shouldBeOpen)
|
||||
{
|
||||
currentPath.Unreachable = true;
|
||||
return;
|
||||
}
|
||||
|
||||
closestButton.Item.Pick(character, false, true);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -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