summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_active.c22
-rw-r--r--src/game/g_local.h1
-rw-r--r--src/game/tremulous.h2
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