diff options
author | chai <chaifix@163.com> | 2021-01-04 15:08:37 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-04 15:08:37 +0800 |
commit | af50160ef5c9a55506157d7d94e20c17cd28ed42 (patch) | |
tree | 95b8c3ee1974b0d5132675473a6cd8382fe99cc6 /Client/Assembly-CSharp/PlayerPhysics.cs | |
parent | 00cfa93034c5b6fad750b395ac14a1c58c9dd93f (diff) |
*协议
Diffstat (limited to 'Client/Assembly-CSharp/PlayerPhysics.cs')
-rw-r--r-- | Client/Assembly-CSharp/PlayerPhysics.cs | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/Client/Assembly-CSharp/PlayerPhysics.cs b/Client/Assembly-CSharp/PlayerPhysics.cs index c751f0d..086529b 100644 --- a/Client/Assembly-CSharp/PlayerPhysics.cs +++ b/Client/Assembly-CSharp/PlayerPhysics.cs @@ -55,12 +55,6 @@ public class PlayerPhysics : InnerNetObject public SkinLayer Skin; - private enum RpcCalls - { - EnterVent, - ExitVent - } - public void Awake() { this.body = base.GetComponent<Rigidbody2D>(); @@ -281,6 +275,7 @@ public class PlayerPhysics : InnerNetObject yield break; } + // 无同步数据 public override bool Serialize(MessageWriter writer, bool initialState) { return false; @@ -288,9 +283,10 @@ public class PlayerPhysics : InnerNetObject public override void Deserialize(MessageReader reader, bool initialState) { - } - - public void RpcEnterVent(int id) + }
+
+
+ public void RpcEnterVent(int id) { if (AmongUsClient.Instance.AmClient) { @@ -310,9 +306,15 @@ public class PlayerPhysics : InnerNetObject MessageWriter messageWriter = AmongUsClient.Instance.StartRpc(this.NetId, 1, SendOption.Reliable); messageWriter.WritePacked(id); messageWriter.EndMessage(); - } - - public override void HandleRpc(byte callId, MessageReader reader) + }
+
+ private enum RpcCalls
+ {
+ EnterVent,
+ ExitVent
+ }
+
+ public override void HandleRpc(byte callId, MessageReader reader) { if (callId == 0) { |