public void FireRadar() { if (netClient.Status != NetConnectionStatus.Connected) { return; } playerToolCooldown = GetToolCooldown(PlayerTools.ProspectingRadar); NetBuffer msgBuffer = netClient.CreateBuffer(); msgBuffer.Write((byte)InfiniminerMessage.UseTool); msgBuffer.Write(playerPosition); msgBuffer.Write(playerCamera.GetLookVector()); msgBuffer.Write((byte)PlayerTools.ProspectingRadar); msgBuffer.Write((byte)BlockType.None); netClient.SendMessage(msgBuffer, NetChannel.ReliableUnordered); }
public void FireRadar() { if (netClient.Status != NetPeerStatus.Running) { return; } playerToolCooldown = GetToolCooldown(PlayerTools.ProspectingRadar); NetOutgoingMessage msgBuffer = netClient.CreateMessage(); msgBuffer.Write((byte)InfiniminerMessage.UseTool); msgBuffer.Write(playerPosition); msgBuffer.Write(playerCamera.GetLookVector()); msgBuffer.Write((byte)PlayerTools.ProspectingRadar); msgBuffer.Write((byte)BlockType.None); netClient.SendMessage(msgBuffer, NetDeliveryMethod.ReliableUnordered); }