summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2014-07-13 21:04:29 +0200
committer/dev/humancontroller <devhc@example.com>2017-03-09 13:51:08 +0100
commit98428e912d7f9385c8dab17231c22f8e2c3d288b (patch)
treea140b93d30e898e5aa56aaf6ae6880b719a7d873
parent93ef35c3c76a11322dc67039749d60465a96250a (diff)
fix trigger_stage activation upon stage jumps
-rw-r--r--src/game/g_main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 002c83f8..cddd5135 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -1268,6 +1268,8 @@ void G_CalculateStages( void )
int alienNextStageThreshold, humanNextStageThreshold;
static int lastAlienStageModCount = 1;
static int lastHumanStageModCount = 1;
+ static int alienTriggerStage = 0;
+ static int humanTriggerStage = 0;
if( alienPlayerCountMod < 0.1f )
alienPlayerCountMod = 0.1f;
@@ -1317,7 +1319,8 @@ void G_CalculateStages( void )
if( g_alienStage.modificationCount > lastAlienStageModCount )
{
- G_Checktrigger_stages( TEAM_ALIENS, g_alienStage.integer );
+ while( alienTriggerStage < MIN( g_alienStage.integer, S3 ) )
+ G_Checktrigger_stages( TEAM_ALIENS, ++alienTriggerStage );
if( g_alienStage.integer == S2 )
level.alienStage2Time = level.time;
@@ -1329,7 +1332,8 @@ void G_CalculateStages( void )
if( g_humanStage.modificationCount > lastHumanStageModCount )
{
- G_Checktrigger_stages( TEAM_HUMANS, g_humanStage.integer );
+ while( humanTriggerStage < MIN( g_humanStage.integer, S3 ) )
+ G_Checktrigger_stages( TEAM_HUMANS, ++humanTriggerStage );
if( g_humanStage.integer == S2 )
level.humanStage2Time = level.time;