diff options
author | Christopher Schwarz <lakitu7@gmail.com> | 2011-02-03 00:26:06 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:58 +0000 |
commit | b27d1dee274f7a11c654cfdd8cbaa0c183be77f6 (patch) | |
tree | 34d274a0deb34ea53c5708ba03a3cd8fcd83bcc8 /src/game/g_active.c | |
parent | 78228ad1d5578ed875ee80764372a9f2919310ee (diff) |
* (bug 4746) Give some small score to basilisks for healing teammates
Diffstat (limited to 'src/game/g_active.c')
-rw-r--r-- | src/game/g_active.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c index d7e73b20..89882760 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -770,6 +770,17 @@ void ClientTimerActions( gentity_t *ent, int msec ) { AddScore( ent, HUMAN_BUILDER_SCOREINC ); } + + // Give score to basis that healed other aliens + if( ent->client->pers.hasHealed ) + { + if( client->ps.weapon == WP_ALEVEL1 ) + AddScore( ent, LEVEL1_REGEN_SCOREINC ); + else if( client->ps.weapon == WP_ALEVEL1_UPG ) + AddScore( ent, LEVEL1_UPG_REGEN_SCOREINC ); + + ent->client->pers.hasHealed = qfalse; + } } // Regenerate Adv. Dragoon barbs @@ -1419,11 +1430,22 @@ void ClientThink_real( gentity_t *ent ) ent->client->pers.teamSelection && boost->health > 0 ) { class_t class = boost->client->ps.stats[ STAT_CLASS ]; + qboolean didBoost = qfalse; + if( class == PCL_ALIEN_LEVEL1 && modifier < LEVEL1_REGEN_MOD ) + { modifier = LEVEL1_REGEN_MOD; + didBoost = qtrue; + } else if( class == PCL_ALIEN_LEVEL1_UPG && modifier < LEVEL1_UPG_REGEN_MOD ) + { modifier = LEVEL1_UPG_REGEN_MOD; + didBoost = qtrue; + } + + if( didBoost && ent->health < client->ps.stats[ STAT_MAX_HEALTH ] ) + boost->client->pers.hasHealed = qtrue; } } |