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

View File

@@ -344,7 +344,7 @@ namespace Barotrauma
}
else
{
this.isDead = false;
if (this.isDead) Revive();
health = msg.ReadRangedSingle(minHealth, maxHealth, 8);

View File

@@ -1995,7 +1995,7 @@ namespace Barotrauma
}
partial void KillProjSpecific();
public void Revive(bool isNetworkMessage)
public void Revive()
{
if (Removed)
{

View File

@@ -1334,7 +1334,7 @@ namespace Barotrauma
Character revivedCharacter = (args.Length == 0) ? Character.Controlled : FindMatchingCharacter(args);
if (revivedCharacter == null) return;
revivedCharacter.Revive(false);
revivedCharacter.Revive();
if (GameMain.Server != null)
{
foreach (Client c in GameMain.Server.ConnectedClients)
@@ -1353,7 +1353,7 @@ namespace Barotrauma
Character revivedCharacter = (args.Length == 0) ? client.Character : FindMatchingCharacter(args);
if (revivedCharacter == null) return;
revivedCharacter.Revive(false);
revivedCharacter.Revive();
if (GameMain.Server != null)
{
foreach (Client c in GameMain.Server.ConnectedClients)