From e4b02f6c6c6f782c17ea23f889f455d5c07ae448 Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 18 Aug 2010 21:56:46 +0000 Subject: [PATCH] Fix the annoying server-starts-paused bug that I added with a recent commit. git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3593 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/sv_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engine/server/sv_main.c b/engine/server/sv_main.c index 637292b47..4749c8a6d 100644 --- a/engine/server/sv_main.c +++ b/engine/server/sv_main.c @@ -3159,7 +3159,7 @@ void SV_CheckTimeouts (void) } } } - if (sv.paused && !nclients) + if ((sv.paused&1) && !nclients) { // nobody left, unpause the server if (SV_TogglePause(NULL)) @@ -3365,7 +3365,8 @@ void SV_Frame (void) sv.gamespeed = 1; #ifndef SERVERONLY - sv.paused = (sv.paused & ~4) | ((!isDedicated && sv.allocated_client_slots == 1 && key_dest != key_game)?4:0); + if ((sv.paused & 4) != ((!isDedicated && sv.allocated_client_slots == 1 && key_dest != key_game)?4:0)) + sv.paused ^= 4; #endif if (oldpaused != sv.paused)