From fd57f842d5e45fe8642cc0dd4ba73de359e0db37 Mon Sep 17 00:00:00 2001 From: eihrul Date: Wed, 8 Jun 2005 01:13:28 +0000 Subject: added broadcasting --- protocol.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'protocol.c') diff --git a/protocol.c b/protocol.c index d0014f0..ef8935b 100644 --- a/protocol.c +++ b/protocol.c @@ -643,11 +643,15 @@ enet_protocol_handle_incoming_commands (ENetHost * host, ENetEvent * event) if (peer -> state == ENET_PEER_STATE_DISCONNECTED || peer -> state == ENET_PEER_STATE_ZOMBIE || - host -> receivedAddress.host != peer -> address.host || + (host -> receivedAddress.host != peer -> address.host && + peer -> address.host != ENET_HOST_BROADCAST) || header -> challenge != peer -> challenge) return 0; else - peer -> address.port = host -> receivedAddress.port; + { + peer -> address.host = host -> receivedAddress.host; + peer -> address.port = host -> receivedAddress.port; + } } if (peer != NULL) -- cgit v1.2.3