-#include "../../common/triggers/target/music.qh"
+#include "mutator_nades.qh"
+#include "../_all.qh"
+
+#include "mutator.qh"
+
+#include "gamemode_keyhunt.qh"
+#include "gamemode_freezetag.qh"
+#include "../../common/nades.qh"
+#include "../../common/monsters/spawn.qh"
+#include "../../common/monsters/sv_monsters.qh"
+
+.float lifetime;
.entity nade_spawnloc;
void nade_timer_think()
-{
+{SELFPARAM();
self.skin = 8 - (self.owner.wait - time) / (autocvar_g_nades_nade_lifetime / 10);
self.nextthink = time;
if(!self.owner || wasfreed(self.owner))
void nade_burn_spawn(entity _nade)
{
- CSQCProjectile(_nade, true, Nade_ProjectileFromID(_nade.nade_type, true), true);
+ CSQCProjectile(_nade, true, NADES[_nade.nade_type].m_projectile[true], true);
}
void nade_spawn(entity _nade)
{
entity timer = spawn();
- setmodel(timer, "models/ok_nade_counter/ok_nade_counter.md3");
+ setmodel(timer, MDL_NADE_TIMER);
setattachment(timer, _nade, "");
timer.classname = "nade_timer";
timer.colormap = _nade.colormap;
_nade.effects |= EF_LOWPRECISION;
- CSQCProjectile(_nade, true, Nade_ProjectileFromID(_nade.nade_type, false), true);
+ CSQCProjectile(_nade, true, NADES[_nade.nade_type].m_projectile[false], true);
}
void napalm_damage(float dist, float damage, float edgedamage, float burntime)
-{
+{SELFPARAM();
entity e;
float d;
vector p;
d = vlen(WarpZone_UnTransformOrigin(RandomSelection_chosen_ent, self.origin) - RandomSelection_chosen_ent.fireball_impactvec);
d = damage + (edgedamage - damage) * (d / dist);
Fire_AddDamage(RandomSelection_chosen_ent, self.realowner, d * burntime, burntime, self.projectiledeathtype | HITTYPE_BOUNCE);
- //trailparticles(self, particleeffectnum("fireball_laser"), self.origin, RandomSelection_chosen_ent.fireball_impactvec);
- pointparticles(particleeffectnum("fireball_laser"), self.origin, RandomSelection_chosen_ent.fireball_impactvec - self.origin, 1);
+ //trailparticles(self, particleeffectnum(EFFECT_FIREBALL_LASER), self.origin, RandomSelection_chosen_ent.fireball_impactvec);
+ Send_Effect(EFFECT_FIREBALL_LASER, self.origin, RandomSelection_chosen_ent.fireball_impactvec - self.origin, 1);
}
}
void napalm_ball_think()
-{
+{SELFPARAM();
if(round_handler_IsActive())
if(!round_handler_IsRoundStarted())
{
void nade_napalm_ball()
-{
+{SELFPARAM();
entity proj;
vector kick;
- spamsound(self, CH_SHOTS, "weapons/fireball_fire.wav", VOL_BASE, ATTEN_NORM);
+ spamsound(self, CH_SHOTS, W_Sound("fireball_fire"), VOL_BASE, ATTEN_NORM);
proj = spawn ();
proj.owner = self.owner;
proj.movetype = MOVETYPE_BOUNCE;
proj.projectiledeathtype = DEATH_NADE_NAPALM;
PROJECTILE_MAKETRIGGER(proj);
- setmodel(proj, "null");
+ setmodel(proj, MDL_Null);
proj.scale = 1;//0.5;
setsize(proj, '-4 -4 -4', '4 4 4');
setorigin(proj, self.origin);
void napalm_fountain_think()
-{
+{SELFPARAM();
if(round_handler_IsActive())
if(!round_handler_IsRoundStarted())
}
void nade_napalm_boom()
-{
+{SELFPARAM();
entity fountain;
int c;
for (c = 0; c < autocvar_g_nades_napalm_ball_count; c++)
void nade_ice_freeze(entity freezefield, entity frost_target, float freeze_time)
{
frost_target.frozen_by = freezefield.realowner;
- pointparticles(particleeffectnum("electro_impact"), frost_target.origin, '0 0 0', 1);
+ Send_Effect(EFFECT_ELECTRO_IMPACT, frost_target.origin, '0 0 0', 1);
Freeze(frost_target, 1/freeze_time, 3, false);
if(frost_target.ballcarried)
if(g_keepaway) { ka_DropEvent(frost_target); }
}
void nade_ice_think()
-{
+{SELFPARAM();
if(round_handler_IsActive())
if(!round_handler_IsRoundStarted())
{
if ( autocvar_g_nades_ice_explode )
{
- string expef;
+ entity expef = NULL;
switch(self.realowner.team)
{
- case NUM_TEAM_1: expef = "nade_red_explode"; break;
- case NUM_TEAM_2: expef = "nade_blue_explode"; break;
- case NUM_TEAM_3: expef = "nade_yellow_explode"; break;
- case NUM_TEAM_4: expef = "nade_pink_explode"; break;
- default: expef = "nade_neutral_explode"; break;
+ case NUM_TEAM_1: expef = EFFECT_NADE_RED_EXPLODE; break;
+ case NUM_TEAM_2: expef = EFFECT_NADE_BLUE_EXPLODE; break;
+ case NUM_TEAM_3: expef = EFFECT_NADE_YELLOW_EXPLODE; break;
+ case NUM_TEAM_4: expef = EFFECT_NADE_PINK_EXPLODE; break;
+ default: expef = EFFECT_NADE_NEUTRAL_EXPLODE; break;
}
- pointparticles(particleeffectnum(expef), self.origin + '0 0 1', '0 0 0', 1);
- sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
+ Send_Effect(expef, self.origin + '0 0 1', '0 0 0', 1);
+ sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
RadiusDamage(self, self.realowner, autocvar_g_nades_nade_damage, autocvar_g_nades_nade_edgedamage,
autocvar_g_nades_nade_radius, self, world, autocvar_g_nades_nade_force, self.projectiledeathtype, self.enemy);
randomp.x = randomr*cos(randomw);
randomp.y = randomr*sin(randomw);
randomp.z = 1;
- pointparticles(particleeffectnum("electro_muzzleflash"), self.origin + randomp, '0 0 0', 1);
+ Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, self.origin + randomp, '0 0 0', 1);
if(time >= self.nade_special_time)
{
self.nade_special_time = time+0.7;
-
- pointparticles(particleeffectnum("electro_impact"), self.origin, '0 0 0', 1);
- pointparticles(particleeffectnum("icefield"), self.origin, '0 0 0', 1);
+ Send_Effect(EFFECT_ELECTRO_IMPACT, self.origin, '0 0 0', 1);
+ Send_Effect(EFFECT_ICEFIELD, self.origin, '0 0 0', 1);
}
}
void nade_ice_boom()
-{
+{SELFPARAM();
entity fountain;
fountain = spawn();
fountain.owner = self.owner;
if ( autocvar_g_nades_ice_explode )
{
- setmodel(fountain, "models/grenademodel.md3");
+ setmodel(fountain, MDL_PROJECTILE_GRENADE);
entity timer = spawn();
- setmodel(timer, "models/ok_nade_counter/ok_nade_counter.md3");
+ setmodel(timer, MDL_NADE_TIMER);
setattachment(timer, fountain, "");
timer.classname = "nade_timer";
timer.colormap = self.colormap;
timer.skin = 10;
}
else
- setmodel(fountain, "null");
+ setmodel(fountain, MDL_Null);
}
void nade_translocate_boom()
-{
+{SELFPARAM();
if(self.realowner.vehicle)
return;
makevectors(self.realowner.angles);
- entity oldself = self;
- self = self.realowner;
- MUTATOR_CALLHOOK(PortalTeleport);
- self.realowner = self;
- self = oldself;
+ MUTATOR_CALLHOOK(PortalTeleport, self.realowner);
- TeleportPlayer(self, self.realowner, locout, self.realowner.mangle, v_forward * vlen(self.realowner.velocity), '0 0 0', '0 0 0', TELEPORT_FLAGS_TELEPORTER);
+ TeleportPlayer(self, self.realowner, locout, self.realowner.angles, v_forward * vlen(self.realowner.velocity), '0 0 0', '0 0 0', TELEPORT_FLAGS_TELEPORTER);
}
void nade_spawn_boom()
-{
+{SELFPARAM();
entity spawnloc = spawn();
setorigin(spawnloc, self.origin);
setsize(spawnloc, self.realowner.mins, self.realowner.maxs);
}
void nade_heal_think()
-{
+{SELFPARAM();
if(time >= self.ltime)
{
remove(self);
}
void nade_heal_touch()
-{
+{SELFPARAM();
float maxhealth;
float health_factor;
- if(IS_PLAYER(other) || (other.flags & FL_MONSTER))
+ if(IS_PLAYER(other) || IS_MONSTER(other))
if(other.deadflag == DEAD_NO)
if(!other.frozen)
{
}
if ( health_factor > 0 )
{
- maxhealth = (other.flags & FL_MONSTER) ? other.max_health : g_pickup_healthmega_max;
+ maxhealth = (IS_MONSTER(other)) ? other.max_health : g_pickup_healthmega_max;
if ( other.health < maxhealth )
{
if ( self.nade_show_particles )
- pointparticles(particleeffectnum("healing_fx"), other.origin, '0 0 0', 1);
+ Send_Effect(EFFECT_HEALING, other.origin, '0 0 0', 1);
other.health = min(other.health+health_factor, maxhealth);
}
other.pauserothealth_finished = max(other.pauserothealth_finished, time + autocvar_g_balance_pause_health_rot);
}
- if ( IS_REAL_CLIENT(other) || (other.vehicle_flags & VHF_ISVEHICLE) )
+ if ( IS_REAL_CLIENT(other) || IS_VEHICLE(other) )
{
- entity show_red = (other.vehicle_flags & VHF_ISVEHICLE) ? other.owner : other;
+ entity show_red = (IS_VEHICLE(other)) ? other.owner : other;
show_red.stat_healing_orb = time+0.1;
show_red.stat_healing_orb_alpha = 0.75 * (self.ltime - time) / self.healer_lifetime;
}
}
void nade_heal_boom()
-{
+{SELFPARAM();
entity healer;
healer = spawn();
healer.owner = self.owner;
healer.solid = SOLID_TRIGGER;
healer.touch = nade_heal_touch;
- setmodel(healer, "models/ctf/shield.md3");
+ setmodel(healer, MDL_NADE_HEAL);
healer.healer_radius = autocvar_g_nades_nade_radius;
vector size = '1 1 1' * healer.healer_radius / 2;
setsize(healer,-size,size);
}
void nade_monster_boom()
-{
+{SELFPARAM();
entity e = spawnmonster(self.pokenade_type, 0, self.realowner, self.realowner, self.origin, false, false, 1);
if(autocvar_g_nades_pokenade_monster_lifetime > 0)
}
void nade_boom()
-{
- string expef;
+{SELFPARAM();
+ entity expef = NULL;
bool nade_blast = true;
- switch ( self.nade_type )
+ switch ( NADES[self.nade_type] )
{
case NADE_TYPE_NAPALM:
nade_blast = autocvar_g_nades_napalm_blast;
- expef = "explosion_medium";
+ expef = EFFECT_EXPLOSION_MEDIUM;
break;
case NADE_TYPE_ICE:
nade_blast = false;
- expef = "electro_combo"; // hookbomb_explode electro_combo bigplasma_impact
+ expef = EFFECT_ELECTRO_COMBO; // hookbomb_explode electro_combo bigplasma_impact
break;
case NADE_TYPE_TRANSLOCATE:
nade_blast = false;
- expef = "";
break;
case NADE_TYPE_MONSTER:
case NADE_TYPE_SPAWN:
nade_blast = false;
switch(self.realowner.team)
{
- case NUM_TEAM_1: expef = "spawn_event_red"; break;
- case NUM_TEAM_2: expef = "spawn_event_blue"; break;
- case NUM_TEAM_3: expef = "spawn_event_yellow"; break;
- case NUM_TEAM_4: expef = "spawn_event_pink"; break;
- default: expef = "spawn_event_neutral"; break;
+ case NUM_TEAM_1: expef = EFFECT_SPAWN_RED; break;
+ case NUM_TEAM_2: expef = EFFECT_SPAWN_BLUE; break;
+ case NUM_TEAM_3: expef = EFFECT_SPAWN_YELLOW; break;
+ case NUM_TEAM_4: expef = EFFECT_SPAWN_PINK; break;
+ default: expef = EFFECT_SPAWN_NEUTRAL; break;
}
break;
case NADE_TYPE_HEAL:
nade_blast = false;
- expef = "spawn_event_red";
+ expef = EFFECT_SPAWN_RED;
break;
default:
case NADE_TYPE_NORMAL:
switch(self.realowner.team)
{
- case NUM_TEAM_1: expef = "nade_red_explode"; break;
- case NUM_TEAM_2: expef = "nade_blue_explode"; break;
- case NUM_TEAM_3: expef = "nade_yellow_explode"; break;
- case NUM_TEAM_4: expef = "nade_pink_explode"; break;
- default: expef = "nade_neutral_explode"; break;
+ case NUM_TEAM_1: expef = EFFECT_NADE_RED_EXPLODE; break;
+ case NUM_TEAM_2: expef = EFFECT_NADE_BLUE_EXPLODE; break;
+ case NUM_TEAM_3: expef = EFFECT_NADE_YELLOW_EXPLODE; break;
+ case NUM_TEAM_4: expef = EFFECT_NADE_PINK_EXPLODE; break;
+ default: expef = EFFECT_NADE_NEUTRAL_EXPLODE; break;
}
}
- if(expef != "")
- pointparticles(particleeffectnum(expef), findbetterlocation(self.origin, 8), '0 0 0', 1);
+ if(expef)
+ Send_Effect(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);
+ sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
self.event_damage = func_null; // prevent somehow calling damage in the next call
}
if(self.takedamage)
- switch ( self.nade_type )
+ switch ( NADES[self.nade_type] )
{
case NADE_TYPE_NAPALM: nade_napalm_boom(); break;
case NADE_TYPE_ICE: nade_ice_boom(); break;
case NADE_TYPE_MONSTER: nade_monster_boom(); break;
}
+ entity head;
+ for(head = world; (head = find(head, classname, "grapplinghook")); )
+ if(head.aiment == self)
+ RemoveGrapplingHook(head.realowner);
+
remove(self);
}
void nade_touch()
-{
+{SELFPARAM();
/*float is_weapclip = 0;
if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NODRAW)
if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NONSOLID))
is_weapclip = 1;*/
if(ITEM_TOUCH_NEEDKILL()) // || is_weapclip)
{
+ entity head;
+ for(head = world; (head = find(head, classname, "grapplinghook")); )
+ if(head.aiment == self)
+ RemoveGrapplingHook(head.realowner);
remove(self);
return;
}
//UpdateCSQCProjectile(self);
if(self.health == self.max_health)
{
- spamsound(self, CH_SHOTS, strcat("weapons/grenade_bounce", ftos(1 + rint(random() * 5)), ".wav"), VOL_BASE, ATTEN_NORM);
+ spamsound(self, CH_SHOTS, W_Sound(strcat("grenade_bounce", ftos(1 + rint(random() * 5)))), VOL_BASE, ATTEN_NORM);
return;
}
}
void nade_beep()
-{
+{SELFPARAM();
sound(self, CH_SHOTS_SINGLE, "overkill/grenadebip.ogg", VOL_BASE, 0.5 *(ATTEN_LARGE + ATTEN_MAX));
self.think = nade_boom;
self.nextthink = max(self.wait, time);
}
void nade_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
-{
+{SELFPARAM();
if(ITEM_DAMAGE_NEEDKILL(deathtype))
{
self.takedamage = DAMAGE_NO;
return;
}
- if(self.nade_type == NADE_TYPE_TRANSLOCATE || self.nade_type == NADE_TYPE_SPAWN)
+ if(self.nade_type == NADE_TYPE_TRANSLOCATE.m_id || self.nade_type == NADE_TYPE_SPAWN.m_id)
return;
- if(DEATH_ISWEAPON(deathtype, WEP_BLASTER))
+ if(DEATH_ISWEAPON(deathtype, WEP_BLASTER.m_id))
{
force *= 1.5;
damage = 0;
}
- if(DEATH_ISWEAPON(deathtype, WEP_VAPORIZER) && (deathtype & HITTYPE_SECONDARY))
+ if(DEATH_ISWEAPON(deathtype, WEP_VAPORIZER.m_id) && (deathtype & HITTYPE_SECONDARY))
{
force *= 0.5; // too much
frag_damage = 0;
}
- if(DEATH_ISWEAPON(deathtype, WEP_VORTEX) || DEATH_ISWEAPON(deathtype, WEP_VAPORIZER))
+ if(DEATH_ISWEAPON(deathtype, WEP_VORTEX.m_id) || DEATH_ISWEAPON(deathtype, WEP_VAPORIZER.m_id))
{
force *= 6;
damage = self.max_health * 0.55;
}
- if(DEATH_ISWEAPON(deathtype, WEP_MACHINEGUN) || DEATH_ISWEAPON(deathtype, WEP_HMG))
+ if(DEATH_ISWEAPON(deathtype, WEP_MACHINEGUN.m_id) || DEATH_ISWEAPON(deathtype, WEP_HMG.m_id))
damage = self.max_health * 0.1;
- if(DEATH_ISWEAPON(deathtype, WEP_SHOCKWAVE) || DEATH_ISWEAPON(deathtype, WEP_SHOTGUN)) // WEAPONTODO
+ if(DEATH_ISWEAPON(deathtype, WEP_SHOCKWAVE.m_id) || DEATH_ISWEAPON(deathtype, WEP_SHOTGUN.m_id)) // WEAPONTODO
if(deathtype & HITTYPE_SECONDARY)
{
damage = self.max_health * 0.1;
self.health -= damage;
- if ( self.nade_type != NADE_TYPE_HEAL || IS_PLAYER(attacker) )
+ if ( self.nade_type != NADE_TYPE_HEAL.m_id || IS_PLAYER(attacker) )
self.realowner = attacker;
if(self.health <= 0)
}
void toss_nade(entity e, vector _velocity, float _time)
-{
+{SELFPARAM();
if(e.nade == world)
return;
offset = '0 0 0';
setorigin(_nade, w_shotorg + offset + (v_right * 25) * -1);
- //setmodel(_nade, "models/weapons/v_ok_grenade.md3");
+ //setmodel(_nade, MDL_PROJECTILE_NADE);
//setattachment(_nade, world, "");
PROJECTILE_MAKETRIGGER(_nade);
setsize(_nade, '-16 -16 -16', '16 16 16');
_nade.toss_time = time;
_nade.solid = SOLID_CORPSE; //((_nade.nade_type == NADE_TYPE_TRANSLOCATE) ? SOLID_CORPSE : SOLID_BBOX);
- if(_nade.nade_type == NADE_TYPE_TRANSLOCATE || _nade.nade_type == NADE_TYPE_SPAWN)
+ if(_nade.nade_type == NADE_TYPE_TRANSLOCATE.m_id || _nade.nade_type == NADE_TYPE_SPAWN.m_id)
_nade.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
else
_nade.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY;
}
float nade_customize()
-{
+{SELFPARAM();
//if(IS_SPEC(other)) { return false; }
if(other == self.realowner || (IS_SPEC(other) && other.enemy == self.realowner))
{
{
//self.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
if(!self.traileffectnum)
- self.traileffectnum = particleeffectnum(Nade_TrailEffect(Nade_ProjectileFromID(self.nade_type, false), self.team));
+ self.traileffectnum = _particleeffectnum(Nade_TrailEffect(NADES[self.nade_type].m_projectile[false], self.team));
self.alpha = 1;
}
}
void nade_prime()
-{
+{SELFPARAM();
+ if(autocvar_g_nades_bonus_only)
+ if(!self.bonus_nades)
+ return; // only allow bonus nades
+
if(self.nade)
remove(self.nade);
n.classname = "nade";
fn.classname = "fake_nade";
- if(self.items & IT_STRENGTH && autocvar_g_nades_bonus_onstrength)
+ if(self.items & ITEM_Strength.m_itemid && autocvar_g_nades_bonus_onstrength)
n.nade_type = self.nade_type;
else if (self.bonus_nades >= 1)
{
n.pokenade_type = ((autocvar_g_nades_client_select) ? self.cvar_cl_pokenade_type : autocvar_g_nades_pokenade_monster_type);
}
- n.nade_type = bound(1, n.nade_type, NADE_TYPE_LAST);
+ n.nade_type = bound(1, n.nade_type, NADES_COUNT);
- setmodel(n, "models/weapons/v_ok_grenade.md3");
+ setmodel(n, MDL_PROJECTILE_NADE);
//setattachment(n, self, "bip01 l hand");
n.exteriormodeltoclient = self;
n.customizeentityforclient = nade_customize;
- n.traileffectnum = particleeffectnum(Nade_TrailEffect(Nade_ProjectileFromID(n.nade_type, false), self.team));
- n.colormod = Nade_Color(n.nade_type);
+ n.traileffectnum = _particleeffectnum(Nade_TrailEffect(NADES[n.nade_type].m_projectile[false], self.team));
+ n.colormod = NADES[n.nade_type].m_color;
n.realowner = self;
n.colormap = self.colormap;
n.glowmod = self.glowmod;
n.nextthink = max(n.wait - 3, time);
n.projectiledeathtype = DEATH_NADE;
- setmodel(fn, "models/weapons/h_ok_grenade.iqm");
+ setmodel(fn, MDL_NADE_VIEW);
setattachment(fn, self.weaponentity, "");
fn.realowner = fn.owner = self;
- fn.colormod = Nade_Color(n.nade_type);
+ fn.colormod = NADES[n.nade_type].m_color;
fn.colormap = self.colormap;
fn.glowmod = self.glowmod;
fn.think = SUB_Remove;
}
float CanThrowNade()
-{
+{SELFPARAM();
if(self.vehicle)
return false;
if (!autocvar_g_nades)
return false; // allow turning them off mid match
- if(forbidWeaponUse())
+ if(forbidWeaponUse(self))
return false;
if (!IS_PLAYER(self))
}
void nades_CheckThrow()
-{
+{SELFPARAM();
if(!CanThrowNade())
return;
}
MUTATOR_HOOKFUNCTION(nades_PlayerPreThink)
-{
+{SELFPARAM();
if(!IS_PLAYER(self)) { return false; }
float key_pressed = self.BUTTON_HOOK;
float time_score;
- if(g_grappling_hook || client_hasweapon(self, WEP_HOOK, false, false) || (weaponsInMap & WEPSET_HOOK))
+ if(g_grappling_hook || client_hasweapon(self, WEP_HOOK.m_id, false, false) || (weaponsInMap & WEPSET_HOOK))
key_pressed = self.button16; // if hook is enabled, use an alternate key
if(self.nade)
self.pokenade_type = autocvar_g_nades_pokenade_monster_type;
}
- self.nade_type = bound(1, self.nade_type, NADE_TYPE_LAST);
+ self.nade_type = bound(1, self.nade_type, NADES_COUNT);
if(self.bonus_nade_score >= 0 && autocvar_g_nades_bonus_score_max)
nades_GiveBonus(self, time_score / autocvar_g_nades_bonus_score_max);
}
MUTATOR_HOOKFUNCTION(nades_PlayerSpawn)
-{
+{SELFPARAM();
if(autocvar_g_nades_spawn)
self.nade_refire = time + autocvar_g_spawnshieldtime;
else
{
Unfreeze(frag_target);
frag_target.health = autocvar_g_freezetag_revive_nade_health;
- pointparticles(particleeffectnum("iceorglass"), frag_target.origin, '0 0 0', 3);
+ Send_Effect(EFFECT_ICEORGLASS, frag_target.origin, '0 0 0', 3);
frag_damage = 0;
frag_force = '0 0 0';
Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_REVIVED_NADE, frag_target.netname);
}
MUTATOR_HOOKFUNCTION(nades_MonsterDies)
-{
+{SELFPARAM();
if(IS_PLAYER(frag_attacker))
if(DIFF_TEAM(frag_attacker, self))
if(!(self.spawnflags & MONSTERFLAG_SPAWNED))
}
MUTATOR_HOOKFUNCTION(nades_RemovePlayer)
-{
+{SELFPARAM();
nades_Clear(self);
nades_RemoveBonus(self);
return false;
}
MUTATOR_HOOKFUNCTION(nades_SpectateCopy)
-{
+{SELFPARAM();
self.nade_timer = other.nade_timer;
self.nade_type = other.nade_type;
self.pokenade_type = other.pokenade_type;
addstat(STAT_HEALING_ORB, AS_FLOAT, stat_healing_orb);
addstat(STAT_HEALING_ORB_ALPHA, AS_FLOAT, stat_healing_orb_alpha);
- precache_model("models/ok_nade_counter/ok_nade_counter.md3");
- precache_model("models/weapons/h_ok_grenade.iqm");
- precache_model("models/weapons/v_ok_grenade.md3");
- precache_model("models/ctf/shield.md3");
-
- precache_sound("weapons/rocket_impact.wav");
- precache_sound("weapons/grenade_bounce1.wav");
- precache_sound("weapons/grenade_bounce2.wav");
- precache_sound("weapons/grenade_bounce3.wav");
- precache_sound("weapons/grenade_bounce4.wav");
- precache_sound("weapons/grenade_bounce5.wav");
- precache_sound("weapons/grenade_bounce6.wav");
+ precache_sound(W_Sound("rocket_impact"));
+ precache_sound(W_Sound("grenade_bounce1"));
+ precache_sound(W_Sound("grenade_bounce2"));
+ precache_sound(W_Sound("grenade_bounce3"));
+ precache_sound(W_Sound("grenade_bounce4"));
+ precache_sound(W_Sound("grenade_bounce5"));
+ precache_sound(W_Sound("grenade_bounce6"));
precache_sound("overkill/grenadebip.ogg");
}