diff options
Diffstat (limited to 'src/game/g_combat.c')
-rw-r--r-- | src/game/g_combat.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c index bfe0de9..397bde0 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -432,6 +432,21 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int if( level.intermissiontime ) return; + if( self->client->ps.weapon == WP_GRENADE && + self->client->ps.stats[ STAT_MISC ] > 0 ) + { + int fuse_left; + + fuse_left = GRENADE_FUSE_TIME - self->client->ps.stats[ STAT_MISC ]; + + if( fuse_left < 0 ) + { + fuse_left = 0; + } + + launch_grenade( self, self->s.origin, vec3_origin, fuse_left ); + } + self->client->ps.pm_type = PM_DEAD; self->suicideTime = 0; |