Re-enabled anchoring main limb to the collider when a remote player is unconscious (otherwise only the position of the collider will be synced, and the ragdoll won't follow it)

+ stunned characters can't send position updates
This commit is contained in:
Regalis
2017-02-25 16:47:20 +02:00
parent bf3fa804df
commit c9f09031de
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -1805,7 +1805,7 @@ namespace Barotrauma
{
data = null;
if (GameMain.Server != null && (type != NetworkEventType.InventoryUpdate || (!IsUnconscious && !IsDead)))
if (GameMain.Server != null && (type != NetworkEventType.InventoryUpdate || (!IsUnconscious && !IsDead && Stun <= 0.0f)))
{
Client sender = GameMain.Server.ConnectedClients.Find(c => c.Connection == message.SenderConnection);
if (sender == null || sender.Character != this)
@@ -1997,7 +1997,7 @@ namespace Barotrauma
return false;
}
if (GameMain.Server != null && (isDead || IsUnconscious)) return false;
if (GameMain.Server != null && (isDead || IsUnconscious || Stun > 0.0f)) return false;
keys[(int)InputType.Use].Held = actionKeyState;
keys[(int)InputType.Use].SetState(false, actionKeyState);