Fixes for the new update

This commit is contained in:
EvilFactory
2024-10-22 13:02:59 -03:00
parent 30a8f0c561
commit 14d3402b8d
5 changed files with 24 additions and 21 deletions
@@ -44,7 +44,7 @@ namespace Barotrauma.Networking
private readonly Dictionary<CharacterTeamType, List<Door>> shuttleDoors = new Dictionary<CharacterTeamType, List<Door>>();
private readonly Dictionary<CharacterTeamType, List<ItemContainer>> respawnContainers = new Dictionary<CharacterTeamType, List<ItemContainer>>();
private class TeamSpecificState
public class TeamSpecificState
{
public readonly CharacterTeamType TeamID;
@@ -267,7 +267,7 @@ namespace Barotrauma.Networking
partial void UpdateReturningProjSpecific(TeamSpecificState teamSpecificState, float deltaTime);
private Submarine GetShuttle(CharacterTeamType team)
public Submarine GetShuttle(CharacterTeamType team)
{
if (respawnShuttles.TryGetValue(team, out Submarine sub))
{
@@ -276,6 +276,16 @@ namespace Barotrauma.Networking
return null;
}
public TeamSpecificState GetTeamSpecificState(CharacterTeamType team)
{
if (teamSpecificStates.TryGetValue(team, out TeamSpecificState state))
{
return state;
}
return null;
}
private void ResetShuttle(TeamSpecificState teamSpecificState)
{
teamSpecificState.ReturnTime = DateTime.Now + new TimeSpan(0, 0, 0, 0, milliseconds: (int)(maxTransportTime * 1000));