Unstable 0.1300.0.5

This commit is contained in:
Markus Isberg
2021-04-01 16:09:18 +03:00
parent 862221635c
commit 96b2184811
54 changed files with 429 additions and 122 deletions
@@ -257,9 +257,10 @@ namespace Barotrauma.Networking
msg.Write(SenderName);
msg.Write(SenderClient != null);
msg.Write(SenderClient != null ?
((SenderClient.SteamID != 0) ? SenderClient.SteamID : SenderClient.ID) :
0);
if (SenderClient != null)
{
msg.Write((SenderClient.SteamID != 0) ? SenderClient.SteamID : SenderClient.ID);
}
msg.Write(Sender != null && c.InGame);
if (Sender != null && c.InGame)
{
@@ -9,9 +9,10 @@
msg.Write((byte)ChatMessageType.Order);
msg.Write(SenderName);
msg.Write(SenderClient != null);
msg.Write(SenderClient != null ?
((SenderClient.SteamID != 0) ? SenderClient.SteamID : SenderClient.ID) :
0);
if (SenderClient != null)
{
msg.Write((SenderClient.SteamID != 0) ? SenderClient.SteamID : SenderClient.ID);
}
msg.Write(Sender != null && c.InGame);
if (Sender != null && c.InGame)
{
@@ -19,11 +19,13 @@ namespace Barotrauma.Networking
if (c.SpectateOnly && (GameMain.Server.ServerSettings.AllowSpectating || GameMain.Server.OwnerConnection == c.Connection)) { continue; }
if (c.Character != null && !c.Character.IsDead) { continue; }
//don't allow respawning if the client has previously disconnected and their corpse is still present on the server
var matchingData = campaign?.GetClientCharacterData(c);
if (matchingData != null && matchingData.HasSpawned)
if (UseRespawnPrompt)
{
if (!c.WaitForNextRoundRespawn.HasValue || c.WaitForNextRoundRespawn.Value) { continue; }
var matchingData = campaign?.GetClientCharacterData(c);
if (matchingData != null && matchingData.HasSpawned)
{
if (!c.WaitForNextRoundRespawn.HasValue || c.WaitForNextRoundRespawn.Value) { continue; }
}
}
yield return c;