etqw-sdk/base/script/projectiles/grenade.script
2008-05-29 00:00:00 +00:00

29 lines
669 B
Text

/***********************************************************************
grenade.script - ONLY used by the bots to track the death of grenades.
***********************************************************************/
object projectile_grenade : projectile_missile {
void BotOnExplode();
}
void projectile_grenade::BotOnExplode() {
if ( !sys.isClient() ) {
float isStroyBomb = getFloatKey( "is_stroybomb" );
if ( isStroyBomb ) {
return;
}
player p = getOwner();
if ( p != $null_entity ) {
p.setPlayerGrenadeState( self, true );
}
}
}
void projectile_grenade::vOnLocalMapRestart() {
killEffect( "fx_trail" );
}