From 620554c07e2d58b3b64dc2f341e9361a2ebcedf8 Mon Sep 17 00:00:00 2001 From: cschwarz Date: Mon, 1 Aug 2011 23:44:50 +0000 Subject: [PATCH] * (bug 5007) Minor improvements to target_*_win for better behavior in edge cases (/dev/humancontroller) --- src/game/g_main.c | 3 ++- src/game/g_target.c | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/game/g_main.c b/src/game/g_main.c index 44ed6182..5aea9b7a 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -2055,7 +2055,8 @@ void CheckExitRules( void ) } if( level.uncondHumanWin || - ( ( level.time > level.startTime + 1000 ) && + ( !level.uncondAlienWin && + ( level.time > level.startTime + 1000 ) && ( level.numAlienSpawns == 0 ) && ( level.numLiveAlienClients == 0 ) ) ) { diff --git a/src/game/g_target.c b/src/game/g_target.c index 53df65cb..3157c8f1 100644 --- a/src/game/g_target.c +++ b/src/game/g_target.c @@ -409,7 +409,8 @@ target_alien_win_use */ void target_alien_win_use( gentity_t *self, gentity_t *other, gentity_t *activator ) { - level.uncondAlienWin = qtrue; + if( !level.uncondHumanWin ) + level.uncondAlienWin = qtrue; } /* @@ -429,7 +430,8 @@ target_human_win_use */ void target_human_win_use( gentity_t *self, gentity_t *other, gentity_t *activator ) { - level.uncondHumanWin = qtrue; + if( !level.uncondAlienWin ) + level.uncondHumanWin = qtrue; } /*