velocityjitter 324 324 324
rotate -180 180 -100 100
-effect nade_explode
+effect nade_neutral_explode
countabsolute 1
type decal
tex 8 16
lightradiusfade 1500
lightcolor 100 20 20
// shockwave
-effect nade_explode
+effect nade_neutral_explode
type smoke
countabsolute 1
tex 33 33
alpha 80 80 650
velocitymultiplier 44
// fire
-effect nade_explode
+effect nade_neutral_explode
notunderwater
count 16
type smoke
velocityjitter 320 320 320
rotate -180 180 -9 9
// fire stretched
-effect nade_explode
+effect nade_neutral_explode
count 8
type spark
tex 48 55
velocityjitter 30 30 30
airfriction -9
//smoke
-effect nade_explode
+effect nade_neutral_explode
type smoke
count 32
blend alpha
airfriction 0.04
gravity 0.4
// underwater bubbles
-effect nade_explode
+effect nade_neutral_explode
underwater
count 32
type bubble
velocityjitter 196 196 196
rotate 0 0 0 0
// bouncing sparks
-effect nade_explode
+effect nade_neutral_explode
notunderwater
count 8
type spark
originjitter 16 16 16
velocityjitter 424 424 624
// notbouncing sparks
-effect nade_explode
+effect nade_neutral_explode
count 16
type spark
tex 40 40
originjitter 16 16 16
velocityjitter 424 424 624
// debris
-effect nade_explode
+effect nade_neutral_explode
notunderwater
count 8
type smoke
}
}
- pointparticles(particleeffectnum(expef), self.origin + '0 0 1', '0 0 0', 1);
+ if(expef != "")
+ pointparticles(particleeffectnum(expef), findbetterlocation(self.origin, 8), '0 0 0', 1);
sound(self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, ATTEN_NORM);
sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
Damage_DamageInfo(self.origin, autocvar_g_nades_nade_damage, autocvar_g_nades_nade_edgedamage, autocvar_g_nades_nade_radius, '1 1 1' * autocvar_g_nades_nade_force, self.projectiledeathtype, 0, self);
}
+ if(self.health != -1337)
switch ( self.nade_type )
{
case NADE_TYPE_NAPALM: nade_napalm_boom(); break;
void nade_touch()
{
- if(trace_dphitcontents & (DPCONTENTS_PLAYERCLIP | DPCONTENTS_MONSTERCLIP)) { return; }
+ if(ITEM_TOUCH_NEEDKILL())
+ {
+ remove(self);
+ return;
+ }
+
PROJECTILE_TOUCH;
+
//setsize(self, '-2 -2 -2', '2 2 2');
//UpdateCSQCProjectile(self);
if(self.health == self.max_health)
void nade_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
{
+ if(ITEM_DAMAGE_NEEDKILL(deathtype))
+ {
+ self.health = -1337; // hack
+ nade_boom();
+ return;
+ }
+
if(self.nade_type == NADE_TYPE_TRANSLOCATE || self.nade_type == NADE_TYPE_SPAWN)
return;