diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2015-04-11 21:17:39 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2015-04-11 21:17:39 +0200 |
commit | 397f8c6f86aa68eeef6a94cc33473c0ffd69372d (patch) | |
tree | 75c44e5265f1d94607b9fd3e573b418ba3b2fc63 /src/game/g_buildable.c | |
parent | 22bfcab00937a147a91073796d71538dadbee491 (diff) |
Revert the removal of stamina and sprinting.
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r-- | src/game/g_buildable.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index fa66979..21f5424 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -2830,7 +2830,8 @@ void HMedistat_Think( gentity_t *self ) if( player->client && player->client->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) { - if( player->health < player->client->ps.stats[ STAT_MAX_HEALTH ] && + if( ( player->health < player->client->ps.stats[ STAT_MAX_HEALTH ] || + player->client->ps.stats[ STAT_STAMINA ] < STAMINA_MAX ) && PM_Live( player->client->ps.pm_type ) ) { self->enemy = player; @@ -2860,6 +2861,12 @@ void HMedistat_Think( gentity_t *self ) } else if( self->enemy && self->enemy->client ) //heal! { + if( self->enemy->client->ps.stats[ STAT_STAMINA ] < STAMINA_MAX ) + self->enemy->client->ps.stats[ STAT_STAMINA ] += STAMINA_MEDISTAT_RESTORE; + + if( self->enemy->client->ps.stats[ STAT_STAMINA ] > STAMINA_MAX ) + self->enemy->client->ps.stats[ STAT_STAMINA ] = STAMINA_MAX; + self->enemy->health++; //if they're completely healed, give them a medkit |