Clients use the Revive method instead of just setting health above zero when the host revives a character. Fixes dismembered characters staying dismembered client-side.

This commit is contained in:
Joonas Rikkonen
2018-08-15 11:52:48 +03:00
parent e513b379f4
commit b1f8de887c
3 changed files with 4 additions and 4 deletions
@@ -344,7 +344,7 @@ namespace Barotrauma
} }
else else
{ {
this.isDead = false; if (this.isDead) Revive();
health = msg.ReadRangedSingle(minHealth, maxHealth, 8); health = msg.ReadRangedSingle(minHealth, maxHealth, 8);
@@ -1995,7 +1995,7 @@ namespace Barotrauma
} }
partial void KillProjSpecific(); partial void KillProjSpecific();
public void Revive(bool isNetworkMessage) public void Revive()
{ {
if (Removed) if (Removed)
{ {
@@ -1334,7 +1334,7 @@ namespace Barotrauma
Character revivedCharacter = (args.Length == 0) ? Character.Controlled : FindMatchingCharacter(args); Character revivedCharacter = (args.Length == 0) ? Character.Controlled : FindMatchingCharacter(args);
if (revivedCharacter == null) return; if (revivedCharacter == null) return;
revivedCharacter.Revive(false); revivedCharacter.Revive();
if (GameMain.Server != null) if (GameMain.Server != null)
{ {
foreach (Client c in GameMain.Server.ConnectedClients) foreach (Client c in GameMain.Server.ConnectedClients)
@@ -1353,7 +1353,7 @@ namespace Barotrauma
Character revivedCharacter = (args.Length == 0) ? client.Character : FindMatchingCharacter(args); Character revivedCharacter = (args.Length == 0) ? client.Character : FindMatchingCharacter(args);
if (revivedCharacter == null) return; if (revivedCharacter == null) return;
revivedCharacter.Revive(false); revivedCharacter.Revive();
if (GameMain.Server != null) if (GameMain.Server != null)
{ {
foreach (Client c in GameMain.Server.ConnectedClients) foreach (Client c in GameMain.Server.ConnectedClients)