Vote kick settings

This commit is contained in:
Regalis
2016-06-07 14:13:12 +03:00
parent 0e24eab5e3
commit 9689ef070d
3 changed files with 44 additions and 6 deletions

View File

@@ -12,6 +12,8 @@ namespace Barotrauma
{
private bool allowSubVoting, allowModeVoting;
public bool AllowVoteKick = true;
public bool AllowEndVoting = true;
public bool AllowSubVoting
@@ -243,8 +245,9 @@ namespace Barotrauma
{
msg.Write((byte)voters.Count(v => v.GetVote<bool>(VoteType.EndRound)));
msg.Write((byte)voters.Count);
}
}
msg.Write(AllowVoteKick);
}
public void ReadData(NetIncomingMessage msg)
@@ -286,6 +289,8 @@ namespace Barotrauma
GameMain.NetworkMember.EndVoteCount = msg.ReadByte();
GameMain.NetworkMember.EndVoteMax = msg.ReadByte();
}
AllowVoteKick = msg.ReadBoolean();
}
}
}