Traitor Count/Coefficient and Ragdoll and Karma server settings buttons!!! oh my GOD!!!

This commit is contained in:
Alex Noir
2017-12-09 19:09:10 +03:00
parent e050404278
commit 07aeac4fdc
3 changed files with 102 additions and 4 deletions
@@ -1471,7 +1471,7 @@ namespace Barotrauma
//Do ragdoll shenanigans before Stun because it's still technically a stun, innit? Less network updates for us!
if (IsForceRagdolled)
IsRagdolled = IsForceRagdolled;
else if (!IsRagdolled || (GameMain.Server != null && AnimController.Collider.LinearVelocity.Length() < 1f)) //Keep us ragdolled if we were forced or we're too speedy to unragdoll
else if (GameMain.Server != null && GameMain.Server.AllowRagdollButton && (!IsRagdolled || AnimController.Collider.LinearVelocity.Length() < 1f)) //Keep us ragdolled if we were forced or we're too speedy to unragdoll
IsRagdolled = IsKeyDown(InputType.Ragdoll); //Handle this here instead of Control because we can stop being ragdolled ourselves
if (IsRagdolled)
@@ -130,6 +130,13 @@ namespace Barotrauma.Networking
private set;
}
[Serialize(true, true)]
public bool AllowRagdollButton
{
get;
private set;
}
[Serialize(true, true)]
public bool AllowFileTransfers
{
@@ -210,6 +217,20 @@ namespace Barotrauma.Networking
private set;
}
[Serialize(true, true)]
public bool traitorUseRatio
{
get;
private set;
}
[Serialize(0.2f, true)]
public float traitorRatio
{
get;
private set;
}
[Serialize(false,true)]
public bool KarmaEnabled
{