Browse Source

Added enet_peer_get_peer_id (returns uint of index in peer array.

Added enet_peer_get_peer_id (returns uint of index in peer array.
Maxim 6 years ago
parent
commit
89c4db3260
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Source/Native/enet.h

+ 5 - 1
Source/Native/enet.h

@@ -4258,6 +4258,10 @@ extern "C" {
 	enet_uint32 enet_peer_get_id(const ENetPeer* peer) {
 		return peer->connectID;
 	}
+	
+	enet_uint16 enet_peer_get_peer_id(const ENetPeer* peer) {
+		return peer->incomingPeerID;
+	}
 
 	int enet_peer_get_ip(const ENetPeer* peer, char* ip, size_t ipLength) {
 		return enet_address_get_host_ip(&peer->address, ip, ipLength);
@@ -5067,4 +5071,4 @@ extern "C" {
 }
 #endif
 #endif
-#endif
+#endif