diff options
author | Mikko Tiusanen <ams@daug.net> | 2014-07-06 15:54:19 +0300 |
---|---|---|
committer | Mikko Tiusanen <ams@daug.net> | 2014-07-06 15:54:19 +0300 |
commit | 5034af293e7b83c40b5f5de836c04c012737bf1c (patch) | |
tree | 46a9afcbcf12a366d1415cfc71dc3aacd85be48f /src/game/g_buildable.c | |
parent | 592e6fe7e6d03cb1aca0da7e0c9627972362ed50 (diff) |
Medipad now deals out medikit even when there's no need to activate for healing.
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r-- | src/game/g_buildable.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 7fb6fba..954a546 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -2821,6 +2821,9 @@ void HMedistat_Think( gentity_t *self ) player->client->ps.stats[ STAT_STATE ] |= SS_HEALING_ACTIVE; } } + else if( SPAWN_WITH_MEDKIT && + !BG_InventoryContainsUpgrade( UP_MEDKIT, player->client->ps.stats ) ) + BG_AddUpgradeToInventory( UP_MEDKIT, self->enemy->client->ps.stats ); } } } @@ -2847,7 +2850,9 @@ void HMedistat_Think( gentity_t *self ) if( self->enemy->health >= self->enemy->client->ps.stats[ STAT_MAX_HEALTH ] ) { self->enemy->health = self->enemy->client->ps.stats[ STAT_MAX_HEALTH ]; - if (SPAWN_WITH_MEDKIT) BG_AddUpgradeToInventory( UP_MEDKIT, self->enemy->client->ps.stats ); + if( SPAWN_WITH_MEDKIT && + !BG_InventoryContainsUpgrade( UP_MEDKIT, self->enemy->client->ps.stats ) ) + BG_AddUpgradeToInventory( UP_MEDKIT, self->enemy->client->ps.stats ); } } } |