public void CallCmdSelfDeduct(PlayerStats.HitInfo info) { if (!NetworkClient.active) { Debug.LogError("Command function CmdSelfDeduct called on server."); return; } if (base.isServer) { this.CmdSelfDeduct(info); return; } NetworkWriter networkWriter = new NetworkWriter(); networkWriter.Write(0); networkWriter.Write((short)((ushort)5)); networkWriter.WritePackedUInt32((uint)PlayerStats.kCmdCmdSelfDeduct); networkWriter.Write(base.GetComponent <NetworkIdentity>().netId); GeneratedNetworkCode._WriteHitInfo_PlayerStats(networkWriter, info); base.SendCommandInternal(networkWriter, 2, "CmdSelfDeduct"); }
public void CallCmdSuicide(PlayerStats.HitInfo hitInfo) { if (!NetworkClient.active) { Debug.LogError("Command function CmdSuicide called on server."); return; } if (base.isServer) { this.CmdSuicide(hitInfo); return; } NetworkWriter networkWriter = new NetworkWriter(); networkWriter.Write(0); networkWriter.Write((short)((ushort)5)); networkWriter.WritePackedUInt32((uint)CharacterClassManager.kCmdCmdSuicide); networkWriter.Write(base.GetComponent <NetworkIdentity>().netId); GeneratedNetworkCode._WriteHitInfo_PlayerStats(networkWriter, hitInfo); base.SendCommandInternal(networkWriter, 0, "CmdSuicide"); }