summaryrefslogtreecommitdiff
path: root/src/game/g_buildable.c
diff options
context:
space:
mode:
authorMikko Tiusanen <ams@daug.net>2014-07-06 15:54:19 +0300
committerMikko Tiusanen <ams@daug.net>2014-07-06 15:54:19 +0300
commit5034af293e7b83c40b5f5de836c04c012737bf1c (patch)
tree46a9afcbcf12a366d1415cfc71dc3aacd85be48f /src/game/g_buildable.c
parent592e6fe7e6d03cb1aca0da7e0c9627972362ed50 (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.c7
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 );
}
}
}