summaryrefslogtreecommitdiff
path: root/Client/Assembly-CSharp/VoteBanSystem.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assembly-CSharp/VoteBanSystem.cs')
-rw-r--r--Client/Assembly-CSharp/VoteBanSystem.cs18
1 files changed, 10 insertions, 8 deletions
diff --git a/Client/Assembly-CSharp/VoteBanSystem.cs b/Client/Assembly-CSharp/VoteBanSystem.cs
index 23d030f..9b8c6bd 100644
--- a/Client/Assembly-CSharp/VoteBanSystem.cs
+++ b/Client/Assembly-CSharp/VoteBanSystem.cs
@@ -3,22 +3,19 @@ using System.Collections.Generic;
using Hazel;
using InnerNet;
+// 投票
public class VoteBanSystem : InnerNetObject
{
public static VoteBanSystem Instance;
public Dictionary<int, int[]> Votes = new Dictionary<int, int[]>();
- public enum RpcCalls
- {
- AddVote
- }
-
public void Awake()
{
VoteBanSystem.Instance = this;
}
+ // RpcVote
public void CmdAddVote(int clientId)
{
this.AddVote(AmongUsClient.Instance.ClientId, clientId);
@@ -64,9 +61,14 @@ public class VoteBanSystem : InnerNetObject
{
int[] array;
return this.Votes.TryGetValue(clientId, out array) && Array.IndexOf<int>(array, AmongUsClient.Instance.ClientId) != -1;
- }
-
- public override void HandleRpc(byte callId, MessageReader reader)
+ }
+
+ public enum RpcCalls
+ {
+ AddVote
+ }
+
+ public override void HandleRpc(byte callId, MessageReader reader)
{
if (callId == 0)
{