private void RelayNetMessage(int cnnId, int channelId, int recHostId, Net_InGameRelay msg) { int targetCnId = pairedConnectionIds[cnnId]; int targetHostId = connectionIdToHostId[targetCnId]; // get the user we need to message from the map and then relay the message to them SendClient(targetHostId, targetCnId, channelId, msg.msg); }
private void RelayMessage(NetMsg msg) { if (GameManager.Instance != null && GameManager.gameMode != GameManager.GameMode.online) { return; // don't send messages if GameMode isn't online } Net_InGameRelay relay = new Net_InGameRelay(); relay.msg = msg; Client.Instance.SendServer(relay); }