plugins/funcommands/timebomb.sp
changeset 3094 f606f5c1dbca
parent 2920 1d5645ab7ae0
child 4305 fe0e55c4d544
     1.1 --- a/plugins/funcommands/timebomb.sp	Fri Jul 23 21:23:35 2010 -0400
     1.2 +++ b/plugins/funcommands/timebomb.sp	Mon Jul 26 08:15:52 2010 -0400
     1.3 @@ -127,8 +127,11 @@
     1.4  	}
     1.5  	else
     1.6  	{
     1.7 -		TE_SetupExplosion(vec, g_ExplosionSprite, 5.0, 1, 0, GetConVarInt(g_Cvar_TimeBombRadius), 5000);
     1.8 -		TE_SendToAll();
     1.9 +		if (g_ExplosionSprite > -1)
    1.10 +		{
    1.11 +			TE_SetupExplosion(vec, g_ExplosionSprite, 5.0, 1, 0, GetConVarInt(g_Cvar_TimeBombRadius), 5000);
    1.12 +			TE_SendToAll();
    1.13 +		}
    1.14  
    1.15  		EmitAmbientSound(SOUND_BOOM, vec, client, SNDLEVEL_RAIDSIREN);
    1.16  
    1.17 @@ -166,8 +169,12 @@
    1.18  				damage = RoundToFloor(damage * ((GetConVarFloat(g_Cvar_TimeBombRadius) - distance) / GetConVarFloat(g_Cvar_TimeBombRadius)));
    1.19  					
    1.20  				SlapPlayer(i, damage, false);
    1.21 -				TE_SetupExplosion(pos, g_ExplosionSprite, 0.05, 1, 0, 1, 1);
    1.22 -				TE_SendToAll();				
    1.23 +				
    1.24 +				if (g_ExplosionSprite > -1)
    1.25 +				{
    1.26 +					TE_SetupExplosion(pos, g_ExplosionSprite, 0.05, 1, 0, 1, 1);
    1.27 +					TE_SendToAll();	
    1.28 +				}
    1.29  				
    1.30  				/* ToDo
    1.31  				new Float:dir[3];