From 5034af293e7b83c40b5f5de836c04c012737bf1c Mon Sep 17 00:00:00 2001 From: Mikko Tiusanen Date: Sun, 6 Jul 2014 15:54:19 +0300 Subject: Medipad now deals out medikit even when there's no need to activate for healing. --- src/game/g_buildable.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/game') 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 ); } } } -- cgit