From 70d72043fb43db528eeef40133f6d4dffa427230 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 28 Jul 2016 23:22:00 +1000 Subject: [PATCH] Add an intrusive list for projectiles --- qcsrc/common/gamemodes/gamemode/nexball/nexball.qc | 1 + qcsrc/common/monsters/monster/mage.qc | 1 + qcsrc/common/monsters/monster/shambler.qc | 1 + qcsrc/common/monsters/monster/spider.qc | 1 + qcsrc/common/monsters/monster/wyvern.qc | 1 + qcsrc/common/mutators/mutator/nades/nades.qc | 2 ++ qcsrc/common/mutators/mutator/overkill/rpc.qc | 1 + qcsrc/common/turrets/sv_turrets.qc | 3 ++- qcsrc/common/turrets/turret/hellion_weapon.qc | 1 - qcsrc/common/turrets/turret/walker.qc | 3 ++- qcsrc/common/vehicles/sv_vehicles.qc | 5 +++-- qcsrc/common/vehicles/vehicle/raptor.qc | 3 +-- qcsrc/common/weapons/weapon/blaster.qc | 1 + qcsrc/common/weapons/weapon/crylink.qc | 2 ++ qcsrc/common/weapons/weapon/devastator.qc | 1 + qcsrc/common/weapons/weapon/electro.qc | 2 ++ qcsrc/common/weapons/weapon/fireball.qc | 2 ++ qcsrc/common/weapons/weapon/hagar.qc | 3 +++ qcsrc/common/weapons/weapon/hlac.qc | 2 ++ qcsrc/common/weapons/weapon/hook.qc | 1 + qcsrc/common/weapons/weapon/minelayer.qc | 2 ++ qcsrc/common/weapons/weapon/mortar.qc | 2 ++ qcsrc/common/weapons/weapon/porto.qc | 1 + qcsrc/common/weapons/weapon/seeker.qc | 9 ++++++--- qcsrc/common/weapons/weapon/vaporizer.qc | 2 ++ qcsrc/server/defs.qh | 3 +++ qcsrc/server/g_hook.qc | 1 + 27 files changed, 47 insertions(+), 10 deletions(-) diff --git a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc index 21d2d858b..0d6eb3fe9 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc @@ -833,6 +833,7 @@ void W_Nexball_Attack2(entity actor) missile.effects = EF_BRIGHTFIELD | EF_LOWPRECISION; missile.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, missile); CSQCProjectile(missile, true, PROJECTILE_ELECTRO, true); } diff --git a/qcsrc/common/monsters/monster/mage.qc b/qcsrc/common/monsters/monster/mage.qc index 65c82ab37..707956d36 100644 --- a/qcsrc/common/monsters/monster/mage.qc +++ b/qcsrc/common/monsters/monster/mage.qc @@ -235,6 +235,7 @@ void M_Mage_Attack_Spike(entity this, vector dir) missile.solid = SOLID_BBOX; set_movetype(missile, MOVETYPE_FLYMISSILE); missile.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, missile); setorigin(missile, this.origin + v_forward * 14 + '0 0 30' + v_right * -14); setsize(missile, '0 0 0', '0 0 0'); missile.velocity = dir * 400; diff --git a/qcsrc/common/monsters/monster/shambler.qc b/qcsrc/common/monsters/monster/shambler.qc index afbb954c0..3018741b0 100644 --- a/qcsrc/common/monsters/monster/shambler.qc +++ b/qcsrc/common/monsters/monster/shambler.qc @@ -173,6 +173,7 @@ void M_Shambler_Attack_Lightning(entity this) gren.angles = vectoangles (gren.velocity); gren.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, gren); CSQCProjectile(gren, true, PROJECTILE_SHAMBLER_LIGHTNING, true); } diff --git a/qcsrc/common/monsters/monster/spider.qc b/qcsrc/common/monsters/monster/spider.qc index c7ffece15..5eb3a2a83 100644 --- a/qcsrc/common/monsters/monster/spider.qc +++ b/qcsrc/common/monsters/monster/spider.qc @@ -194,6 +194,7 @@ void M_Spider_Attack_Web(entity this) proj.health = 500; proj.event_damage = func_null; proj.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, proj); proj.damagedbycontents = true; proj.bouncefactor = 0.3; diff --git a/qcsrc/common/monsters/monster/wyvern.qc b/qcsrc/common/monsters/monster/wyvern.qc index 53d08effa..817606b4d 100644 --- a/qcsrc/common/monsters/monster/wyvern.qc +++ b/qcsrc/common/monsters/monster/wyvern.qc @@ -69,6 +69,7 @@ METHOD(WyvernAttack, wr_think, void(WyvernAttack thiswep, entity actor, .entity setsize(missile, '-6 -6 -6', '6 6 6'); setorigin(missile, actor.origin + actor.view_ofs + v_forward * 14); missile.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, missile); missile.velocity = w_shotdir * (autocvar_g_monster_wyvern_attack_fireball_speed); missile.avelocity = '300 300 300'; missile.nextthink = time + 5; diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index 5570a1b08..73271176e 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -294,6 +294,7 @@ void nade_napalm_ball(entity this) proj.angles = vectoangles(proj.velocity); proj.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, proj); proj.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_ARC; //CSQCProjectile(proj, true, PROJECTILE_NAPALM_FIRE, true); @@ -941,6 +942,7 @@ void toss_nade(entity e, bool set_owner, vector _velocity, float _time) _nade.damagedbycontents = true; _nade.angles = vectoangles(_nade.velocity); _nade.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, _nade); _nade.projectiledeathtype = DEATH_NADE.m_id; _nade.toss_time = time; _nade.solid = SOLID_CORPSE; //((_nade.nade_type == NADE_TYPE_TRANSLOCATE) ? SOLID_CORPSE : SOLID_BBOX); diff --git a/qcsrc/common/mutators/mutator/overkill/rpc.qc b/qcsrc/common/mutators/mutator/overkill/rpc.qc index 4c59f183a..a2fdd43a6 100644 --- a/qcsrc/common/mutators/mutator/overkill/rpc.qc +++ b/qcsrc/common/mutators/mutator/overkill/rpc.qc @@ -143,6 +143,7 @@ void W_RocketPropelledChainsaw_Attack (Weapon thiswep, entity actor) missile.cnt = time + WEP_CVAR(rpc, lifetime); missile.nextthink = time; missile.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, missile); CSQCProjectile(missile, true, PROJECTILE_RPC, false); diff --git a/qcsrc/common/turrets/sv_turrets.qc b/qcsrc/common/turrets/sv_turrets.qc index 2c1895ff4..a543c1d88 100644 --- a/qcsrc/common/turrets/sv_turrets.qc +++ b/qcsrc/common/turrets/sv_turrets.qc @@ -476,7 +476,8 @@ entity turret_projectile(entity actor, Sound _snd, float _size, float _health, f proj.nextthink = time + 9; set_movetype(proj, MOVETYPE_FLYMISSILE); proj.velocity = normalize(actor.tur_shotdir_updated + randomvec() * actor.shot_spread) * actor.shot_speed; - proj.flags = FL_PROJECTILE; + proj.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, proj); proj.enemy = actor.enemy; proj.totalfrags = _death; PROJECTILE_MAKETRIGGER(proj); diff --git a/qcsrc/common/turrets/turret/hellion_weapon.qc b/qcsrc/common/turrets/turret/hellion_weapon.qc index 9e737ea6c..bc8e581e0 100644 --- a/qcsrc/common/turrets/turret/hellion_weapon.qc +++ b/qcsrc/common/turrets/turret/hellion_weapon.qc @@ -33,7 +33,6 @@ METHOD(HellionAttack, wr_think, void(entity thiswep, entity actor, .entity weapo te_explosion (missile.origin); setthink(missile, turret_hellion_missile_think); missile.nextthink = time; - missile.flags = FL_PROJECTILE; missile.max_health = time + 9; missile.tur_aimpos = randomvec() * 128; missile.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_GUIDED_HEAT; diff --git a/qcsrc/common/turrets/turret/walker.qc b/qcsrc/common/turrets/turret/walker.qc index 3f55280e8..32f645f27 100644 --- a/qcsrc/common/turrets/turret/walker.qc +++ b/qcsrc/common/turrets/turret/walker.qc @@ -259,7 +259,8 @@ void walker_fire_rocket(entity this, vector org) rocket.velocity = normalize((v_forward + v_up * 0.5) + (randomvec() * 0.2)) * (autocvar_g_turrets_unit_walker_rocket_speed); rocket.angles = vectoangles(rocket.velocity); settouch(rocket, walker_rocket_touch); - rocket.flags = FL_PROJECTILE; + rocket.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, rocket); rocket.solid = SOLID_BBOX; rocket.max_health = time + 9; rocket.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_GUIDED_HEAT; diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index 8677e1619..696ac4a5c 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -228,7 +228,8 @@ entity vehicles_projectile(entity this, string _mzlfx, Sound _mzlsound, proj.totalfrags = _deahtype; proj.solid = SOLID_BBOX; set_movetype(proj, MOVETYPE_FLYMISSILE); - proj.flags = FL_PROJECTILE; + proj.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, proj); proj.bot_dodge = true; proj.bot_dodgerating = _dmg; proj.velocity = _vel; @@ -246,7 +247,7 @@ entity vehicles_projectile(entity this, string _mzlfx, Sound _mzlsound, proj.health = _health; } else - proj.flags = FL_PROJECTILE | FL_NOTARGET; + proj.flags |= FL_NOTARGET; if(_mzlsound != SND_Null) sound (this, CH_WEAPON_A, _mzlsound, VOL_BASE, ATTEN_NORM); diff --git a/qcsrc/common/vehicles/vehicle/raptor.qc b/qcsrc/common/vehicles/vehicle/raptor.qc index d938c4ad3..b0f5eb23a 100644 --- a/qcsrc/common/vehicles/vehicle/raptor.qc +++ b/qcsrc/common/vehicles/vehicle/raptor.qc @@ -430,9 +430,8 @@ bool raptor_frame(entity this) if(vehic.bomb1.cnt < time) { bool incoming = false; - FOREACH_ENTITY_ENT(enemy, vehic, + IL_EACH(g_projectiles, it.enemy == vehic, { - if(it.flags & FL_PROJECTILE) if(MISSILE_IS_TRACKING(it)) if(vdist(vehic.origin - it.origin, <, 2 * autocvar_g_vehicle_raptor_flare_range)) { diff --git a/qcsrc/common/weapons/weapon/blaster.qc b/qcsrc/common/weapons/weapon/blaster.qc index 3a9bf365d..b40ffc921 100644 --- a/qcsrc/common/weapons/weapon/blaster.qc +++ b/qcsrc/common/weapons/weapon/blaster.qc @@ -137,6 +137,7 @@ void W_Blaster_Attack( settouch(missile, W_Blaster_Touch); missile.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, missile); missile.missile_flags = MIF_SPLASH; missile.projectiledeathtype = atk_deathtype; setthink(missile, W_Blaster_Think); diff --git a/qcsrc/common/weapons/weapon/crylink.qc b/qcsrc/common/weapons/weapon/crylink.qc index 47fa8efca..04b0026b5 100644 --- a/qcsrc/common/weapons/weapon/crylink.qc +++ b/qcsrc/common/weapons/weapon/crylink.qc @@ -439,6 +439,7 @@ void W_Crylink_Attack(Weapon thiswep, entity actor) //proj.glow_size = 20; proj.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, proj); proj.missile_flags = MIF_SPLASH; CSQCProjectile(proj, true, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), true); @@ -554,6 +555,7 @@ void W_Crylink_Attack2(Weapon thiswep, entity actor) //proj.glow_size = 20; proj.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, proj); proj.missile_flags = MIF_SPLASH; CSQCProjectile(proj, true, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), true); diff --git a/qcsrc/common/weapons/weapon/devastator.qc b/qcsrc/common/weapons/weapon/devastator.qc index 3049225c4..72a64dca7 100644 --- a/qcsrc/common/weapons/weapon/devastator.qc +++ b/qcsrc/common/weapons/weapon/devastator.qc @@ -390,6 +390,7 @@ void W_Devastator_Attack(Weapon thiswep, entity actor) missile.nextthink = time; missile.cnt = time + WEP_CVAR(devastator, lifetime); missile.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, missile); missile.missile_flags = MIF_SPLASH; CSQCProjectile(missile, WEP_CVAR(devastator, guiderate) == 0 && WEP_CVAR(devastator, speedaccel) == 0, PROJECTILE_ROCKET, false); // because of fly sound diff --git a/qcsrc/common/weapons/weapon/electro.qc b/qcsrc/common/weapons/weapon/electro.qc index 2853625f2..191057cb6 100644 --- a/qcsrc/common/weapons/weapon/electro.qc +++ b/qcsrc/common/weapons/weapon/electro.qc @@ -292,6 +292,7 @@ void W_Electro_Attack_Bolt(Weapon thiswep, entity actor) settouch(proj, W_Electro_TouchExplode); setsize(proj, '0 0 -3', '0 0 -3'); proj.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, proj); proj.missile_flags = MIF_SPLASH; CSQCProjectile(proj, true, PROJECTILE_ELECTRO_BEAM, true); @@ -435,6 +436,7 @@ void W_Electro_Attack_Orb(Weapon thiswep, entity actor) proj.health = WEP_CVAR_SEC(electro, health); proj.event_damage = W_Electro_Orb_Damage; proj.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, proj); proj.damagedbycontents = (WEP_CVAR_SEC(electro, damagedbycontents)); proj.bouncefactor = WEP_CVAR_SEC(electro, bouncefactor); diff --git a/qcsrc/common/weapons/weapon/fireball.qc b/qcsrc/common/weapons/weapon/fireball.qc index 69c2dc006..bfcd1c642 100644 --- a/qcsrc/common/weapons/weapon/fireball.qc +++ b/qcsrc/common/weapons/weapon/fireball.qc @@ -224,6 +224,7 @@ void W_Fireball_Attack1(entity actor) settouch(proj, W_Fireball_TouchExplode); setsize(proj, '-16 -16 -16', '16 16 16'); proj.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, proj); proj.missile_flags = MIF_SPLASH | MIF_PROXY; CSQCProjectile(proj, true, PROJECTILE_FIREBALL, true); @@ -354,6 +355,7 @@ void W_Fireball_Attack2(entity actor) proj.angles = vectoangles(proj.velocity); proj.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, proj); proj.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_ARC; CSQCProjectile(proj, true, PROJECTILE_FIREMINE, true); diff --git a/qcsrc/common/weapons/weapon/hagar.qc b/qcsrc/common/weapons/weapon/hagar.qc index 130c47063..667667f42 100644 --- a/qcsrc/common/weapons/weapon/hagar.qc +++ b/qcsrc/common/weapons/weapon/hagar.qc @@ -169,6 +169,7 @@ void W_Hagar_Attack(Weapon thiswep, entity actor) missile.angles = vectoangles(missile.velocity); missile.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, missile); missile.missile_flags = MIF_SPLASH; CSQCProjectile(missile, true, PROJECTILE_HAGAR, true); @@ -212,6 +213,7 @@ void W_Hagar_Attack2(Weapon thiswep, entity actor) missile.angles = vectoangles(missile.velocity); missile.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, missile); missile.missile_flags = MIF_SPLASH; CSQCProjectile(missile, true, PROJECTILE_HAGAR_BOUNCING, true); @@ -288,6 +290,7 @@ void W_Hagar_Attack2_Load_Release(entity actor, .entity weaponentity) missile.angles = vectoangles(missile.velocity); missile.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, missile); CSQCProjectile(missile, true, PROJECTILE_HAGAR, true); diff --git a/qcsrc/common/weapons/weapon/hlac.qc b/qcsrc/common/weapons/weapon/hlac.qc index ab4e2f7a0..9706c586b 100644 --- a/qcsrc/common/weapons/weapon/hlac.qc +++ b/qcsrc/common/weapons/weapon/hlac.qc @@ -110,6 +110,7 @@ void W_HLAC_Attack(Weapon thiswep, entity actor) missile.nextthink = time + WEP_CVAR_PRI(hlac, lifetime); missile.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, missile); missile.projectiledeathtype = WEP_HLAC.m_id; CSQCProjectile(missile, true, PROJECTILE_HLAC, true); @@ -152,6 +153,7 @@ void W_HLAC_Attack2(entity actor) missile.nextthink = time + WEP_CVAR_SEC(hlac, lifetime); missile.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, missile); missile.missile_flags = MIF_SPLASH; missile.projectiledeathtype = WEP_HLAC.m_id | HITTYPE_SECONDARY; diff --git a/qcsrc/common/weapons/weapon/hook.qc b/qcsrc/common/weapons/weapon/hook.qc index 01a3497d0..fec774e14 100644 --- a/qcsrc/common/weapons/weapon/hook.qc +++ b/qcsrc/common/weapons/weapon/hook.qc @@ -179,6 +179,7 @@ void W_Hook_Attack2(Weapon thiswep, entity actor) gren.angles = '0 0 0'; gren.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, gren); CSQCProjectile(gren, true, PROJECTILE_HOOKBOMB, true); diff --git a/qcsrc/common/weapons/weapon/minelayer.qc b/qcsrc/common/weapons/weapon/minelayer.qc index ff0363339..70925b835 100644 --- a/qcsrc/common/weapons/weapon/minelayer.qc +++ b/qcsrc/common/weapons/weapon/minelayer.qc @@ -102,6 +102,7 @@ void W_MineLayer_Stick(entity this, entity to) newmine.nextthink = time; newmine.cnt = this.cnt; newmine.flags = this.flags; + IL_PUSH(g_projectiles, newmine); remove(this); @@ -367,6 +368,7 @@ void W_MineLayer_Attack(Weapon thiswep, entity actor) mine.nextthink = time; mine.cnt = (WEP_CVAR(minelayer, lifetime) - WEP_CVAR(minelayer, lifetime_countdown)); mine.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, mine); mine.missile_flags = MIF_SPLASH | MIF_ARC | MIF_PROXY; if(mine.cnt > 0) { mine.cnt += time; } diff --git a/qcsrc/common/weapons/weapon/mortar.qc b/qcsrc/common/weapons/weapon/mortar.qc index 748c2347f..94eabce41 100644 --- a/qcsrc/common/weapons/weapon/mortar.qc +++ b/qcsrc/common/weapons/weapon/mortar.qc @@ -248,6 +248,7 @@ void W_Mortar_Attack(Weapon thiswep, entity actor) gren.angles = vectoangles(gren.velocity); gren.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, gren); if(WEP_CVAR_PRI(mortar, type) == 0 || WEP_CVAR_PRI(mortar, type) == 2) CSQCProjectile(gren, true, PROJECTILE_GRENADE, true); @@ -295,6 +296,7 @@ void W_Mortar_Attack2(Weapon thiswep, entity actor) gren.angles = vectoangles(gren.velocity); gren.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, gren); if(WEP_CVAR_SEC(mortar, type) == 0 || WEP_CVAR_SEC(mortar, type) == 2) CSQCProjectile(gren, true, PROJECTILE_GRENADE, true); diff --git a/qcsrc/common/weapons/weapon/porto.qc b/qcsrc/common/weapons/weapon/porto.qc index f17a2ac50..2ab7cd42d 100644 --- a/qcsrc/common/weapons/weapon/porto.qc +++ b/qcsrc/common/weapons/weapon/porto.qc @@ -275,6 +275,7 @@ void W_Porto_Attack(entity actor, float type) gren.angles = vectoangles(gren.velocity); gren.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, gren); gren.portal_id = time; actor.porto_current = gren; diff --git a/qcsrc/common/weapons/weapon/seeker.qc b/qcsrc/common/weapons/weapon/seeker.qc index 00e481ba2..34d8da46e 100644 --- a/qcsrc/common/weapons/weapon/seeker.qc +++ b/qcsrc/common/weapons/weapon/seeker.qc @@ -294,7 +294,8 @@ void W_Seeker_Fire_Missile(Weapon thiswep, entity actor, vector f_diff, entity m setorigin(missile, w_shotorg); setsize(missile, '-4 -4 -4', '4 4 4'); set_movetype(missile, MOVETYPE_FLYMISSILE); - missile.flags = FL_PROJECTILE; + missile.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, missile); missile.missile_flags = MIF_SPLASH | MIF_GUIDED_TAG; W_SetupProjVelocity_UP_PRE(missile, seeker, missile_); @@ -370,7 +371,8 @@ void W_Seeker_Fire_Flac(Weapon thiswep, entity actor) set_movetype(missile, MOVETYPE_FLY); missile.projectiledeathtype = WEP_SEEKER.m_id; missile.projectiledeathtype = WEP_SEEKER.m_id | HITTYPE_SECONDARY; - missile.flags = FL_PROJECTILE; + missile.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, missile); missile.missile_flags = MIF_SPLASH; // csqc projectiles @@ -589,7 +591,8 @@ void W_Seeker_Fire_Tag(Weapon thiswep, entity actor) setorigin(missile, w_shotorg); setsize(missile, '-2 -2 -2', '2 2 2'); - missile.flags = FL_PROJECTILE; + missile.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, missile); //missile.missile_flags = MIF_..?; set_movetype(missile, MOVETYPE_FLY); diff --git a/qcsrc/common/weapons/weapon/vaporizer.qc b/qcsrc/common/weapons/weapon/vaporizer.qc index 8a8e858ec..b2b278c2a 100644 --- a/qcsrc/common/weapons/weapon/vaporizer.qc +++ b/qcsrc/common/weapons/weapon/vaporizer.qc @@ -287,6 +287,7 @@ void W_RocketMinsta_Attack2(entity actor) settouch(proj, W_RocketMinsta_Laser_Touch); setsize(proj, '0 0 -3', '0 0 -3'); proj.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, proj); proj.missile_flags = MIF_SPLASH; CSQCProjectile(proj, true, PROJECTILE_ROCKETMINSTA_LASER, true); @@ -337,6 +338,7 @@ void W_RocketMinsta_Attack3 (entity actor) settouch(proj, W_RocketMinsta_Laser_Touch); setsize(proj, '0 0 -3', '0 0 -3'); proj.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, proj); proj.missile_flags = MIF_SPLASH; CSQCProjectile(proj, true, PROJECTILE_ROCKETMINSTA_LASER, true); diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index a626a3582..109f3ad02 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -458,3 +458,6 @@ STATIC_INIT(g_turrets) { g_turrets = IL_NEW(); } IntrusiveList g_mines; STATIC_INIT(g_mines) { g_mines = IL_NEW(); } + +IntrusiveList g_projectiles; +STATIC_INIT(g_projectiles) { g_projectiles = IL_NEW(); } diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index 88d63e384..a198e9294 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -370,6 +370,7 @@ void FireGrapplingHook(entity actor) missile.reset = GrapplingHookReset; missile.classname = "grapplinghook"; missile.flags = FL_PROJECTILE; + IL_PUSH(g_projectiles, missile); set_movetype(missile, ((autocvar_g_balance_grapplehook_gravity) ? MOVETYPE_TOSS : MOVETYPE_FLY)); PROJECTILE_MAKETRIGGER(missile); -- 2.39.2