From 390d1746a5de2893edbd17059415a0dc8d512d31 Mon Sep 17 00:00:00 2001 From: zico Date: Sun, 22 Feb 2015 18:04:37 +0100 Subject: [PATCH] Fixed conditions so positional data are not sent before the level is loaded. --- similar/main/net_udp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/similar/main/net_udp.cpp b/similar/main/net_udp.cpp index af6f2a47e..d742db4e6 100644 --- a/similar/main/net_udp.cpp +++ b/similar/main/net_udp.cpp @@ -4890,6 +4890,8 @@ void net_udp_send_pdata() return; if (Players[Player_num].connected != CONNECT_PLAYING) return; + if ( !( Network_status == NETSTAT_PLAYING || Network_status == NETSTAT_ENDLEVEL ) ) + return; memset(&buf, 0, sizeof(UDP_frame_info)); @@ -4931,7 +4933,7 @@ void net_udp_process_pdata(const uint8_t *data, uint_fast32_t data_len, const _s UDP_frame_info pd; int len = 0; - if ( !( Game_mode & GM_NETWORK && ( Network_status == NETSTAT_PLAYING || Network_status == NETSTAT_ENDLEVEL || Network_status==NETSTAT_WAITING ) ) ) + if ( !( Game_mode & GM_NETWORK && ( Network_status == NETSTAT_PLAYING || Network_status == NETSTAT_ENDLEVEL ) ) ) return; len++;