From b076b8e7def10c28c04228ec5c776bda91f01926 Mon Sep 17 00:00:00 2001 From: Spoike Date: Tue, 14 May 2013 12:56:26 +0000 Subject: [PATCH] Don't crash from q3 bots. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4365 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/sv_main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/engine/server/sv_main.c b/engine/server/sv_main.c index 4fbc96f93..8294d393c 100644 --- a/engine/server/sv_main.c +++ b/engine/server/sv_main.c @@ -644,9 +644,12 @@ void SV_DropClient (client_t *drop) else if (ISQ3CLIENT(drop)) { } - //send twice, to cover packetloss a little. - Netchan_Transmit (&drop->netchan, termmsg.cursize, termmsg.data, 10000); - Netchan_Transmit (&drop->netchan, termmsg.cursize, termmsg.data, 10000); + if (drop->netchan.remote_address.type != NA_INVALID) + { + //send twice, to cover packetloss a little. + Netchan_Transmit (&drop->netchan, termmsg.cursize, termmsg.data, 10000); + Netchan_Transmit (&drop->netchan, termmsg.cursize, termmsg.data, 10000); + } if (svs.gametype == GT_PROGS || svs.gametype == GT_Q1QVM) //gamecode should do it all for us. { @@ -1456,7 +1459,7 @@ void SVC_GetChallenge (void) { buf = va("challengeResponse %i", svs.challenges[i].challenge); Netchan_OutOfBand(NS_SERVER, &net_from, strlen(buf), buf); - } + } } #endif }