diff --git a/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs b/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs index 1a7eaf05b..6b9d55aee 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs @@ -276,6 +276,9 @@ namespace Barotrauma characterInfos.Add(characterInfo); } + characterInfos.Add(characterInfo); + } + /// /// Remove the character from the crew (and crew menus). /// diff --git a/Barotrauma/BarotraumaShared/Source/Characters/AI/IndoorsSteeringManager.cs b/Barotrauma/BarotraumaShared/Source/Characters/AI/IndoorsSteeringManager.cs index 6c3d6ba8a..da327ea2d 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/AI/IndoorsSteeringManager.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/AI/IndoorsSteeringManager.cs @@ -77,8 +77,6 @@ namespace Barotrauma { var node = currentPath.Nodes[index]; if (node == null) { return false; } - // Only applied if the node is close enough to the current node. - if (Vector2.DistanceSquared(currentPath.CurrentNode.WorldPosition, node.WorldPosition) > 100) { return false; } return node.Ladders != null; } return false; @@ -108,10 +106,9 @@ namespace Barotrauma { var node = currentPath.Nodes[index]; if (node == null) { return false; } - // Only applied if the node is close enough to the current node. - if (Vector2.DistanceSquared(currentPath.CurrentNode.WorldPosition, node.WorldPosition) > 100) { return false; } nextLadder = node.Ladders; - return nextLadder != null && nextLadder == currentLadder; + bool isSame = nextLadder != null && nextLadder == currentLadder; + return isSame; } return false; } @@ -227,7 +224,7 @@ namespace Barotrauma } //only humanoids can climb ladders - if (character.AnimController is HumanoidAnimController && InLadders && IsNextLadderSameAsCurrent) + if (character.AnimController is HumanoidAnimController && IsNextLadderSameAsCurrent) { if (character.SelectedConstruction != currentPath.CurrentNode.Ladders.Item && currentPath.CurrentNode.Ladders.Item.IsInsideTrigger(character.WorldPosition)) @@ -240,9 +237,9 @@ namespace Barotrauma if (character.IsClimbing) { Vector2 diff = currentPath.CurrentNode.SimPosition - pos; - bool nextLadderSamesCurrent = IsNextLadderSameAsCurrent; + bool nextLadderSameAsCurrent = IsNextLadderSameAsCurrent; - if (nextLadderSamesCurrent) + if (nextLadderSameAsCurrent) { //climbing ladders -> don't move horizontally diff.X = 0.0f; @@ -257,17 +254,17 @@ namespace Barotrauma diff.Y = Math.Max(diff.Y, 1.0f); } - bool aboveFloor = heightFromFloor > 0.0f && heightFromFloor < collider.height * 1.5f; + bool aboveFloor = heightFromFloor > 0 && heightFromFloor < collider.height * 1.5f; if (aboveFloor || IsNextNodeLadder) { - if (!nextLadderSamesCurrent) + if (!nextLadderSameAsCurrent) { character.AnimController.Anim = AnimController.Animation.None; } currentPath.SkipToNextNode(); } } - else if (nextLadderSamesCurrent) + else if (nextLadderSameAsCurrent) { //if the current node is below the character and the next one is above (or vice versa) //and both are on ladders, we can skip directly to the next one @@ -277,8 +274,6 @@ namespace Barotrauma currentPath.SkipToNextNode(); } } - - character.AnimController.IgnorePlatforms = false; return diff; } else if (character.AnimController.InWater) diff --git a/Barotrauma/BarotraumaShared/Source/PlayerInput.cs b/Barotrauma/BarotraumaShared/Source/PlayerInput.cs index 21475b092..a10a8c412 100644 --- a/Barotrauma/BarotraumaShared/Source/PlayerInput.cs +++ b/Barotrauma/BarotraumaShared/Source/PlayerInput.cs @@ -145,16 +145,6 @@ namespace Barotrauma } #endif - public void SetState() - { - hit = binding.IsHit(); - if (hit) hitQueue = true; - - held = binding.IsDown(); - if (held) heldQueue = true; - } -#endif - public bool Hit { get