Some networking/matchmaking improvements.

This commit is contained in:
Mr_Goldberg
2020-03-03 09:04:04 -05:00
parent 0e72e995ee
commit a0b66407bf
4 changed files with 20 additions and 7 deletions

View File

@ -1141,6 +1141,16 @@ bool Networking::sendToIPPort(Common_Message *msg, uint32 ip, uint16 port, bool
return true;
}
uint32 Networking::getIP(CSteamID id)
{
Connection *conn = find_connection(id, this->appid);
if (conn) {
return ntohl(conn->tcp_ip_port.ip);
}
return 0;
}
bool Networking::sendTo(Common_Message *msg, bool reliable, Connection *conn)
{
if (!enabled) return false;