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:
@@ -64,16 +64,16 @@ namespace Barotrauma
|
|||||||
levitatingCollider = false;
|
levitatingCollider = false;
|
||||||
Collider.FarseerBody.FixedRotation = false;
|
Collider.FarseerBody.FixedRotation = false;
|
||||||
|
|
||||||
/*if (character.IsRemotePlayer)
|
if (character.IsRemotePlayer)
|
||||||
{
|
{
|
||||||
MainLimb.pullJoint.WorldAnchorB = Collider.SimPosition;
|
MainLimb.pullJoint.WorldAnchorB = Collider.SimPosition;
|
||||||
MainLimb.pullJoint.Enabled = true;
|
MainLimb.pullJoint.Enabled = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{*/
|
{
|
||||||
Collider.LinearVelocity = (GetLimb(LimbType.Waist).SimPosition - Collider.SimPosition) * 20.0f;
|
Collider.LinearVelocity = (GetLimb(LimbType.Waist).SimPosition - Collider.SimPosition) * 20.0f;
|
||||||
Collider.SmoothRotate(GetLimb(LimbType.Torso).Rotation);
|
Collider.SmoothRotate(GetLimb(LimbType.Torso).Rotation);
|
||||||
//}
|
}
|
||||||
|
|
||||||
if (stunTimer > 0)
|
if (stunTimer > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1805,7 +1805,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
data = null;
|
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);
|
Client sender = GameMain.Server.ConnectedClients.Find(c => c.Connection == message.SenderConnection);
|
||||||
if (sender == null || sender.Character != this)
|
if (sender == null || sender.Character != this)
|
||||||
@@ -1997,7 +1997,7 @@ namespace Barotrauma
|
|||||||
return false;
|
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].Held = actionKeyState;
|
||||||
keys[(int)InputType.Use].SetState(false, actionKeyState);
|
keys[(int)InputType.Use].SetState(false, actionKeyState);
|
||||||
|
|||||||
Reference in New Issue
Block a user