summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-04-26 14:21:17 +0200
committerPaweł Redman <pawel.redman@gmail.com>2017-04-26 15:49:32 +0200
commit3bdef682e03faf52a4eec10af06960ec4b467af5 (patch)
tree83d5c898163c3a2d669ef8466207546b89cac5f4
parentb7a35bd780dfc454ac485afd0d75258f18549e5f (diff)
Implement g_nullifyTyrantKills.
-rw-r--r--src/game/g_combat.c4
-rw-r--r--src/game/g_local.h2
-rw-r--r--src/game/g_main.c3
3 files changed, 8 insertions, 1 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index c781959..81a5345 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -286,7 +286,9 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
}
else
{
- AddScore( attacker, 1 );
+ if( !g_nullifyTyrantKills.integer || ( meansOfDeath != MOD_LEVEL4_CHARGE && meansOfDeath != MOD_LEVEL4_CLAW &&
+ !( meansOfDeath == MOD_CHAINGUN && BG_InventoryContainsUpgrade( UP_BATTLESUIT, attacker->client->ps.stats ) ) ) )
+ AddScore( attacker, 1 );
if( g_gradualFreeFunds.integer < 2 )
attacker->client->pers.lastFreekillTime = level.time;
diff --git a/src/game/g_local.h b/src/game/g_local.h
index 8edcc71..d1d232a 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -1471,6 +1471,8 @@ extern vmCvar_t g_karma;
extern vmCvar_t g_chat;
extern vmCvar_t g_adminExpireTime;
+extern vmCvar_t g_nullifyTyrantKills;
+
extern vmCvar_t g_devmapKillerHP;
extern vmCvar_t g_killerHP;
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 4c68925..1ae1029 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -223,6 +223,8 @@ vmCvar_t g_adminExpireTime;
vmCvar_t g_devmapKillerHP;
vmCvar_t g_killerHP;
+vmCvar_t g_nullifyTyrantKills;
+
vmCvar_t g_buildLogMaxLength;
vmCvar_t g_maxGhosts;
@@ -538,6 +540,7 @@ static cvarTable_t gameCvarTable[ ] =
{ &g_allowShare, "g_allowShare", "0", CVAR_ARCHIVE | CVAR_SERVERINFO, 0, qfalse},
{ &g_creditOverflow, "g_creditOverflow", "0", CVAR_ARCHIVE | CVAR_SERVERINFO, 0, qfalse},
{ &g_banNotice, "g_banNotice", "", CVAR_ARCHIVE, 0, qfalse },
+ { &g_nullifyTyrantKills, "g_nullifyTyrantKills", "0", CVAR_ARCHIVE, 0, qfalse },
{ &mod_jetpackFuel, "mod_jetpackFuel", "0", CVAR_ARCHIVE, 0, qfalse },
{ &mod_jetpackConsume, "mod_jetpackConsume", "2", CVAR_ARCHIVE, 0, qfalse },