summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2020-04-01 00:34:03 +0200
committerPaweł Redman <pawel.redman@gmail.com>2020-04-01 00:34:03 +0200
commit1ec4b56e7221a8e43916c7b3ac8c86d588679a74 (patch)
treed0062208524b15b161eca2fe1e695e06bef7d2a1
parent10b31b618ce0205f2b2692504111a3186dbbad7f (diff)
Special stage rules
-rw-r--r--src/game/g_combat.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index e4c3bba..1b57a08 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -434,26 +434,23 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
}
}
- // if players did more than DAMAGE_FRACTION_FOR_KILL increment the stage counters
- if( !OnSameTeam( self, attacker ) && totalDamage >= ( self->client->ps.stats[ STAT_MAX_HEALTH ] * DAMAGE_FRACTION_FOR_KILL ) )
+ // new stage rules™
+ if( self->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
{
- if( self->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
+ trap_Cvar_Set( "g_alienKills", va( "%d", g_alienKills.integer + 1 ) );
+ if( g_alienStage.integer < 2 )
{
- trap_Cvar_Set( "g_alienKills", va( "%d", g_alienKills.integer + 1 ) );
- if( g_alienStage.integer < 2 )
- {
- self->client->pers.statscounters.feeds++;
- level.humanStatsCounters.feeds++;
- }
+ self->client->pers.statscounters.feeds++;
+ level.humanStatsCounters.feeds++;
}
- else if( self->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
+ }
+ else if( self->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
+ {
+ trap_Cvar_Set( "g_humanKills", va( "%d", g_humanKills.integer + 1 ) );
+ if( g_humanStage.integer < 2 )
{
- trap_Cvar_Set( "g_humanKills", va( "%d", g_humanKills.integer + 1 ) );
- if( g_humanStage.integer < 2 )
- {
- self->client->pers.statscounters.feeds++;
- level.alienStatsCounters.feeds++;
- }
+ self->client->pers.statscounters.feeds++;
+ level.alienStatsCounters.feeds++;
}
}