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 | |
parent | 78228ad1d5578ed875ee80764372a9f2919310ee (diff) |
* (bug 4746) Give some small score to basilisks for healing teammates
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_active.c | 22 | ||||
-rw-r--r-- | src/game/g_local.h | 1 | ||||
-rw-r--r-- | src/game/tremulous.h | 2 |
3 files changed, 25 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; } } diff --git a/src/game/g_local.h b/src/game/g_local.h index 691e932a..52f4cb11 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -324,6 +324,7 @@ typedef struct g_admin_admin_t *admin; int aliveSeconds; // time player has been alive in seconds + qboolean hasHealed; // has healed a player (basi regen aura) in the last 10sec (for score use) // used to save persistant[] values while in SPECTATOR_FOLLOW mode int credit; diff --git a/src/game/tremulous.h b/src/game/tremulous.h index e3bbbad6..4ab9ba31 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -71,6 +71,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define LEVEL1_PCLOUD_TIME 10000 #define LEVEL1_REGEN_MOD 2.0f #define LEVEL1_UPG_REGEN_MOD 3.0f +#define LEVEL1_REGEN_SCOREINC AVM(100) // score added for healing per 10s +#define LEVEL1_UPG_REGEN_SCOREINC AVM(200) #define LEVEL2_CLAW_DMG ADM(40) #define LEVEL2_CLAW_RANGE 80.0f |