summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2017-04-15 16:45:01 +0200
committer/dev/humancontroller <devhc@example.com>2017-04-15 16:45:01 +0200
commitb0c9d60a370a1ae651e2850c3b07d6ffa1da69ce (patch)
treee95b816dcac11a498fc3db324e4d3c682e38f083
parent1c2435ce13828d7b90c939aa48a6a89ed5b5cc5f (diff)
fix trigger_stage activation upon stage jumps
-rw-r--r--src/game/g_main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 51731c3..b4f8316 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -1664,6 +1664,8 @@ void G_CalculateStages( void )
float humanPlayerCountMod = level.averageNumHumanClients / PLAYER_COUNT_MOD;
static int lastAlienStageModCount = 1;
static int lastHumanStageModCount = 1;
+ static int alienTriggerStage = 0;
+ static int humanTriggerStage = 0;
if( alienPlayerCountMod < 0.1f )
alienPlayerCountMod = 0.1f;
@@ -1714,6 +1716,9 @@ void G_CalculateStages( void )
if( g_alienStage.modificationCount > lastAlienStageModCount )
{
G_Checktrigger_stages( PTE_ALIENS, g_alienStage.integer );
+ while( alienTriggerStage < MIN( g_alienStage.integer, S3 ) )
+ G_Checktrigger_stages( PTE_ALIENS, ++alienTriggerStage );
+
if( g_alienStage.integer == S2 )
level.alienStage2Time = level.time;
else if( g_alienStage.integer == S3 )
@@ -1724,7 +1729,8 @@ void G_CalculateStages( void )
if( g_humanStage.modificationCount > lastHumanStageModCount )
{
- G_Checktrigger_stages( PTE_HUMANS, g_humanStage.integer );
+ while( humanTriggerStage < MIN( g_humanStage.integer, S3 ) )
+ G_Checktrigger_stages( PTE_HUMANS, ++humanTriggerStage );
if( g_humanStage.integer == S2 )
level.humanStage2Time = level.time;