Browse Source

Just replace.

Just replace.
Maxim 6 years ago
parent
commit
4030319302
2 changed files with 1 additions and 16 deletions
  1. 1 12
      Source/Managed/ENet.cs
  2. 0 4
      Source/Native/enet.h

+ 1 - 12
Source/Managed/ENet.cs

@@ -607,7 +607,6 @@ namespace ENet {
 	public struct Peer {
 		private IntPtr nativePeer;
 		private uint nativeID;
-		private ushort nativePeerID;
 
 		internal IntPtr NativeData {
 			get {
@@ -622,7 +621,6 @@ namespace ENet {
 		public Peer(IntPtr peer) {
 			nativePeer = peer;
 			nativeID = nativePeer != IntPtr.Zero ? Native.enet_peer_get_id(nativePeer) : 0;
-			nativePeerID = nativePeer != IntPtr.Zero ? Native.enet_peer_get_peer_id(nativePeer) : 0;
 		}
 
 		public bool IsSet {
@@ -636,12 +634,6 @@ namespace ENet {
 				return nativeID;
 			}
 		}
-		
-		public ushort PeerID {
-			get {
-				return nativePeerID;
-			}
-		}
 
 		public string IP {
 			get {
@@ -971,9 +963,6 @@ namespace ENet {
 
 		[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
 		internal static extern uint enet_peer_get_id(IntPtr peer);
-		
-		[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
-		internal static extern ushort enet_peer_get_peer_id(IntPtr peer);
 
 		[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
 		internal static extern int enet_peer_get_ip(IntPtr peer, byte[] ip, IntPtr ipLength);
@@ -1038,4 +1027,4 @@ namespace ENet {
 		[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
 		internal static extern void enet_peer_reset(IntPtr peer);
 	}
-}
+}

+ 0 - 4
Source/Native/enet.h

@@ -4256,10 +4256,6 @@ 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;
 	}