From 1420049d168b6dfb2745a4f7fa8736dd12adc13b Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 23 Dec 2024 21:18:53 +1000 Subject: [PATCH] Move most weapon sounds to their weapon files --- qcsrc/client/main.qh | 1 - qcsrc/client/weapons/projectile.qc | 22 +-- qcsrc/common/effects/all.inc | 2 +- qcsrc/common/effects/qc/damageeffects.qc | 8 +- .../gamemode/onslaught/cl_generator.qc | 2 +- .../gamemode/onslaught/sv_onslaught.qc | 2 +- qcsrc/common/models/all.inc | 16 -- qcsrc/common/monsters/monster/golem.qc | 2 +- qcsrc/common/monsters/monster/mage.qc | 6 +- qcsrc/common/monsters/monster/spider.qc | 4 +- qcsrc/common/mutators/mutator/nades/nades.qc | 4 +- .../common/mutators/mutator/overkill/okhmg.qc | 2 +- .../common/mutators/mutator/overkill/okhmg.qh | 2 + .../mutators/mutator/overkill/okmachinegun.qc | 2 +- .../mutators/mutator/overkill/okmachinegun.qh | 8 + .../common/mutators/mutator/overkill/oknex.qc | 6 +- .../common/mutators/mutator/overkill/oknex.qh | 12 +- .../common/mutators/mutator/overkill/okrpc.qc | 2 +- .../common/mutators/mutator/overkill/okrpc.qh | 2 + .../mutators/mutator/overkill/okshotgun.qh | 6 + .../mutator/touchexplode/sv_touchexplode.qc | 4 +- qcsrc/common/sounds/all.inc | 96 +++-------- qcsrc/common/turrets/turret/ewheel_weapon.qc | 4 +- qcsrc/common/turrets/turret/flac_weapon.qc | 4 +- qcsrc/common/turrets/turret/hellion_weapon.qc | 4 +- qcsrc/common/turrets/turret/hk_weapon.qc | 4 +- qcsrc/common/turrets/turret/mlrs_weapon.qc | 4 +- qcsrc/common/turrets/turret/phaser_weapon.qc | 3 +- qcsrc/common/turrets/turret/plasma_weapon.qc | 4 +- qcsrc/common/turrets/turret/walker.qc | 2 +- qcsrc/common/turrets/turret/walker_weapon.qc | 4 +- qcsrc/common/vehicles/vehicle/racer_weapon.qc | 6 +- .../common/vehicles/vehicle/raptor_weapons.qc | 5 +- qcsrc/common/vehicles/vehicle/spiderbot.qc | 2 +- .../vehicles/vehicle/spiderbot_weapons.qc | 6 +- qcsrc/common/weapons/weapon/arc.qc | 4 +- qcsrc/common/weapons/weapon/arc.qh | 7 + qcsrc/common/weapons/weapon/blaster.qc | 2 +- qcsrc/common/weapons/weapon/blaster.qh | 2 + qcsrc/common/weapons/weapon/crylink.qh | 6 + qcsrc/common/weapons/weapon/devastator.qc | 6 +- qcsrc/common/weapons/weapon/devastator.qh | 5 + qcsrc/common/weapons/weapon/electro.qh | 7 + qcsrc/common/weapons/weapon/fireball.qh | 7 + qcsrc/common/weapons/weapon/hagar.qc | 9 +- qcsrc/common/weapons/weapon/hagar.qh | 10 ++ qcsrc/common/weapons/weapon/hlac.qc | 4 +- qcsrc/common/weapons/weapon/hlac.qh | 2 + qcsrc/common/weapons/weapon/hook.qc | 149 ++++-------------- qcsrc/common/weapons/weapon/hook.qh | 5 + qcsrc/common/weapons/weapon/machinegun.qc | 6 +- qcsrc/common/weapons/weapon/machinegun.qh | 2 + qcsrc/common/weapons/weapon/minelayer.qh | 6 + qcsrc/common/weapons/weapon/mortar.qc | 12 +- qcsrc/common/weapons/weapon/mortar.qh | 5 + qcsrc/common/weapons/weapon/porto.qh | 7 + qcsrc/common/weapons/weapon/rifle.qc | 4 +- qcsrc/common/weapons/weapon/rifle.qh | 3 + qcsrc/common/weapons/weapon/seeker.qc | 20 +-- qcsrc/common/weapons/weapon/seeker.qh | 18 +++ qcsrc/common/weapons/weapon/shockwave.qc | 4 +- qcsrc/common/weapons/weapon/shockwave.qh | 3 + qcsrc/common/weapons/weapon/shotgun.qh | 3 + qcsrc/common/weapons/weapon/vaporizer.qc | 6 +- qcsrc/common/weapons/weapon/vaporizer.qh | 3 + qcsrc/common/weapons/weapon/vortex.qc | 6 +- qcsrc/common/weapons/weapon/vortex.qh | 4 + 67 files changed, 272 insertions(+), 328 deletions(-) diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index c5efafb5e..3a5c09782 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -205,7 +205,6 @@ float spectatee_status_changed_time; int tempdb; int ClientProgsDB; vector hook_shotorigin[4]; // WEAPONTODO -vector lightning_shotorigin[4]; // TODO: unused float serverprevtime, serverdeltatime; diff --git a/qcsrc/client/weapons/projectile.qc b/qcsrc/client/weapons/projectile.qc index 893d53ae5..54a1aa46d 100644 --- a/qcsrc/client/weapons/projectile.qc +++ b/qcsrc/client/weapons/projectile.qc @@ -363,7 +363,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) break; case PROJECTILE_RPC: case PROJECTILE_ROCKET: - loopsound(this, CH_SHOTS_SINGLE, SND_ROCKET_FLY, VOL_BASE, ATTEN_NORM); + loopsound(this, CH_SHOTS_SINGLE, SND_DEVASTATOR_FLY, VOL_BASE, ATTEN_NORM); this.mins = '-3 -3 -3'; this.maxs = '3 3 3'; break; @@ -430,7 +430,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) this.maxs = '2 2 2'; break; case PROJECTILE_SEEKER: - loopsound(this, CH_SHOTS_SINGLE, SND_TAG_ROCKET_FLY, VOL_BASE, ATTEN_NORM); + loopsound(this, CH_SHOTS_SINGLE, SND_SEEKER_ROCKET_FLY, VOL_BASE, ATTEN_NORM); this.mins = '-4 -4 -4'; this.maxs = '4 4 4'; break; @@ -447,25 +447,11 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) case PROJECTILE_RAPTORCANNON: break; case PROJECTILE_SPIDERROCKET: - loopsound(this, CH_SHOTS_SINGLE, SND_TAG_ROCKET_FLY, VOL_BASE, ATTEN_NORM); + loopsound(this, CH_SHOTS_SINGLE, SND_VEH_SPIDERBOT_ROCKET_FLY, VOL_BASE, ATTEN_NORM); break; case PROJECTILE_WAKIROCKET: - loopsound(this, CH_SHOTS_SINGLE, SND_TAG_ROCKET_FLY, VOL_BASE, ATTEN_NORM); + loopsound(this, CH_SHOTS_SINGLE, SND_VEH_RACER_ROCKET_FLY, VOL_BASE, ATTEN_NORM); break; - /* - case PROJECTILE_WAKICANNON: - break; - case PROJECTILE_BUMBLE_GUN: - // only new engines support sound moving with object - loopsound(this, CH_SHOTS_SINGLE, SND_ELECTRO_FLY, VOL_BASE, ATTEN_NORM); - this.mins = '0 0 -4'; - this.maxs = '0 0 -4'; - this.move_movetype = MOVETYPE_BOUNCE; - settouch(this, func_null); - this.bouncefactor = WEP_CVAR_SEC(WEP_ELECTRO, bouncefactor); - this.bouncestop = WEP_CVAR_SEC(WEP_ELECTRO, bouncestop); - break; - */ default: break; } diff --git a/qcsrc/common/effects/all.inc b/qcsrc/common/effects/all.inc index 1bd7ad9ed..01b74119b 100644 --- a/qcsrc/common/effects/all.inc +++ b/qcsrc/common/effects/all.inc @@ -31,7 +31,7 @@ EFFECT(0, ARC_OVERHEAT, "arc_overheat") EFFECT(0, ARC_OVERHEAT_FIRE, "arc_overheat_fire") EFFECT(0, ARC_SMOKE, "arc_smoke") EFFECT(0, ARC_LIGHTNING, "arc_lightning") -EFFECT(0, ARC_LIGHTNING2, "electro_lightning") +//EFFECT(0, ARC_LIGHTNING2, "electro_lightning") EFFECT(0, MACHINEGUN_IMPACT, "machinegun_impact") EFFECT(0, MACHINEGUN_MUZZLEFLASH, "uzi_muzzleflash") diff --git a/qcsrc/common/effects/qc/damageeffects.qc b/qcsrc/common/effects/qc/damageeffects.qc index dbc138f41..f3550e4fd 100644 --- a/qcsrc/common/effects/qc/damageeffects.qc +++ b/qcsrc/common/effects/qc/damageeffects.qc @@ -331,11 +331,11 @@ NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew) pointparticles(EFFECT_RAPTOR_BOMB_IMPACT, this.origin, w_backoff * 1000, 1); break; case DEATH_VH_RAPT_DEATH: - sound(this, CH_SHOTS, SND_LASERIMPACT, VOL_BASE, ATTEN_LOW); + sound(this, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_LOW); pointparticles(EFFECT_EXPLOSION_BIG, this.origin, w_backoff * 1000, 1); break; case DEATH_VH_BUMB_GUN: - sound(this, CH_SHOTS, SND_FIREBALL_IMPACT2, VOL_BASE, ATTEN_NORM); + sound(this, CH_SHOTS, SND_VEH_BUMBLEBEE_IMPACT, VOL_BASE, ATTEN_NORM); pointparticles(EFFECT_BIGPLASMA_IMPACT, this.origin, w_backoff * 1000, 1); break; } @@ -362,7 +362,7 @@ NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew) case DEATH_TURRET_FLAC: pointparticles(EFFECT_HAGAR_EXPLODE, w_org, '0 0 0', 1); - sound(this, CH_SHOTS, SND_HAGEXP_RANDOM(), VOL_BASE, ATTEN_NORM); + sound(this, CH_SHOTS, SND_FLACEXP_RANDOM(), VOL_BASE, ATTEN_NORM); break; case DEATH_TURRET_MLRS: @@ -380,7 +380,7 @@ NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew) break; case DEATH_TURRET_PLASMA: - sound(this, CH_SHOTS, SND_ELECTRO_IMPACT, VOL_BASE, ATTEN_LOW); + sound(this, CH_SHOTS, SND_TUR_PLASMA_IMPACT, VOL_BASE, ATTEN_LOW); pointparticles(EFFECT_ELECTRO_IMPACT, this.origin, w_backoff * 1000, 1); break; diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/cl_generator.qc b/qcsrc/common/gamemodes/gamemode/onslaught/cl_generator.qc index d8d28488a..ad0811649 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/cl_generator.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/cl_generator.qc @@ -95,7 +95,7 @@ void generator_draw(entity this) if(random() < 0.25) { te_explosion(this.origin); - sound(this, CH_TRIGGER, SND_GRENADE_IMPACT, VOL_BASE, ATTEN_NORM); + sound(this, CH_TRIGGER, SND_ONS_GENERATOR_EXPLODE, VOL_BASE, ATTEN_NORM); } // Particles diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc index 827aa0f5c..5838c6242 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc @@ -403,7 +403,7 @@ void ons_ControlPoint_Icon_Damage(entity this, entity inflictor, entity attacker if (GetResource(this, RES_HEALTH) < 0) { - sound(this, CH_TRIGGER, SND_GRENADE_IMPACT, VOL_BASE, ATTEN_NORM); + sound(this, CH_TRIGGER, SND_ONS_GENERATOR_EXPLODE, VOL_BASE, ATTEN_NORM); pointparticles(EFFECT_ROCKET_EXPLODE, this.origin, '0 0 0', 1); if (this.owner.message != "") Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(this.team, INFO_ONSLAUGHT_CPDESTROYED), this.owner.message, attacker.netname); diff --git a/qcsrc/common/models/all.inc b/qcsrc/common/models/all.inc index 74a427b66..a20e3d12a 100644 --- a/qcsrc/common/models/all.inc +++ b/qcsrc/common/models/all.inc @@ -20,22 +20,6 @@ MODEL(KH_KEY, "models/keyhunt/key.md3"); MODEL(KH_KEY_CARRIED, "models/keyhunt/key-carried.md3"); #endif -MODEL(OK_HMG, W_Model("g_ok_hmg.md3")); - -MODEL(OK_RPC, W_Model("g_ok_rl.md3")); - -MODEL(OK_MG_VIEW, W_Model("h_ok_mg.iqm")); -MODEL(OK_MG_WORLD, W_Model("v_ok_mg.md3")); -MODEL(OK_MG_ITEM, W_Model("g_ok_mg.md3")); - -MODEL(OK_SHOTGUN_VIEW, W_Model("h_ok_shotgun.iqm")); -MODEL(OK_SHOTGUN_WORLD, W_Model("v_ok_shotgun.md3")); -MODEL(OK_SHOTGUN_ITEM, W_Model("g_ok_shotgun.md3")); - -MODEL(OK_SNIPER_VIEW, W_Model("h_ok_sniper.iqm")); -MODEL(OK_SNIPER_WORLD, W_Model("v_ok_sniper.md3")); -MODEL(OK_SNIPER_ITEM, W_Model("g_ok_sniper.md3")); - MODEL(ONS_CP, "models/onslaught/controlpoint_icon.md3"); MODEL(ONS_CP_SHIELD, "models/onslaught/controlpoint_shield.md3"); MODEL(ONS_CP_PAD1, "models/onslaught/controlpoint_pad.md3"); diff --git a/qcsrc/common/monsters/monster/golem.qc b/qcsrc/common/monsters/monster/golem.qc index 8762dd9e4..e98aa3e45 100644 --- a/qcsrc/common/monsters/monster/golem.qc +++ b/qcsrc/common/monsters/monster/golem.qc @@ -45,7 +45,7 @@ void M_Golem_Attack_Swing(entity this) void M_Golem_Attack_Lightning_Explode(entity this, entity directhitentity) { - sound(this, CH_SHOTS, SND_ELECTRO_IMPACT, VOL_BASE, ATTEN_NORM); + sound(this, CH_SHOTS, SND_MON_GOLEM_LIGHTNING_IMPACT, VOL_BASE, ATTEN_NORM); Send_Effect(EFFECT_ELECTRO_IMPACT, this.origin, '0 0 0', 1); this.event_damage = func_null; diff --git a/qcsrc/common/monsters/monster/mage.qc b/qcsrc/common/monsters/monster/mage.qc index 6e6b7324d..29d72ceac 100644 --- a/qcsrc/common/monsters/monster/mage.qc +++ b/qcsrc/common/monsters/monster/mage.qc @@ -36,6 +36,8 @@ float autocvar_g_monster_mage_speed_run; float autocvar_g_monster_mage_speed_walk; SOUND(MageSpike_FIRE, W_Sound("electro_fire")); +SOUND(MageSpike_IMPACT, W_Sound("grenade_impact")); +SOUND(MageSpike_PUSH, W_Sound("tagexp1")); void M_Mage_Attack_Spike(entity this, vector dir); void M_Mage_Attack_Push(entity this); METHOD(MageSpike, wr_think, void(MageSpike thiswep, entity actor, .entity weaponentity, int fire)) @@ -115,7 +117,7 @@ void M_Mage_Attack_Spike_Explode(entity this, entity directhitentity) { this.event_damage = func_null; - sound(this, CH_SHOTS, SND_GRENADE_IMPACT, VOL_BASE, ATTEN_NORM); + sound(this, CH_SHOTS, SND_MageSpike_IMPACT, VOL_BASE, ATTEN_NORM); this.realowner.mage_spike = NULL; @@ -274,7 +276,7 @@ void M_Mage_Defend_Heal(entity this) void M_Mage_Attack_Push(entity this) { - sound(this, CH_SHOTS, SND_TAGEXP1, 1, ATTEN_NORM); + sound(this, CH_SHOTS, SND_MageSpike_PUSH, 1, ATTEN_NORM); RadiusDamage (this, this, (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_radius), NULL, NULL, (autocvar_g_monster_mage_attack_push_force), DEATH_MONSTER_MAGE.m_id, DMG_NOWEP, this.enemy); Send_Effect(EFFECT_TE_EXPLOSION, this.origin, '0 0 0', 1); diff --git a/qcsrc/common/monsters/monster/spider.qc b/qcsrc/common/monsters/monster/spider.qc index 0d0936eab..90929f5a4 100644 --- a/qcsrc/common/monsters/monster/spider.qc +++ b/qcsrc/common/monsters/monster/spider.qc @@ -43,7 +43,7 @@ MUTATOR_HOOKFUNCTION(spiderweb, MonsterMove) } } -SOUND(SpiderAttack_FIRE, W_Sound("electro_fire")); +SOUND(SpiderAttack_FIRE, W_Sound("electro_fire2")); METHOD(SpiderAttack, wr_think, void(SpiderAttack thiswep, entity actor, .entity weaponentity, int fire)) { TC(SpiderAttack, thiswep); @@ -108,7 +108,7 @@ void M_Spider_Attack_Web_Touch(entity this, entity toucher) void M_Spider_Attack_Web(entity this) { - sound(this, CH_SHOTS, SND_ELECTRO_FIRE2, VOL_BASE, ATTEN_NORM); + sound(this, CH_SHOTS, SND_SpiderAttack_FIRE, VOL_BASE, ATTEN_NORM); entity proj = new(plasma); proj.owner = proj.realowner = this; diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index 323c14d98..e34a405fa 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -99,7 +99,7 @@ MUTATOR_HOOKFUNCTION(cl_nades, EditProjectile) if (proj.cnt == PROJECTILE_NAPALM_FOUNTAIN) { - loopsound(proj, CH_SHOTS_SINGLE, SND_FIREBALL_FLY2, VOL_BASE, ATTEN_NORM); + loopsound(proj, CH_SHOTS_SINGLE, SND_NADE_NAPALM_FLY, VOL_BASE, ATTEN_NORM); proj.mins = '-16 -16 -16'; proj.maxs = '16 16 16'; } @@ -309,7 +309,7 @@ void nade_napalm_ball(entity this) entity proj; vector kick; - spamsound(this, CH_SHOTS, SND_FIREBALL_FIRE, VOL_BASE, ATTEN_NORM); + spamsound(this, CH_SHOTS, SND_NADE_NAPALM_FIRE, VOL_BASE, ATTEN_NORM); proj = new(grenade); proj.owner = this.owner; diff --git a/qcsrc/common/mutators/mutator/overkill/okhmg.qc b/qcsrc/common/mutators/mutator/overkill/okhmg.qc index 6f4693f2a..37e6b15fc 100644 --- a/qcsrc/common/mutators/mutator/overkill/okhmg.qc +++ b/qcsrc/common/mutators/mutator/overkill/okhmg.qc @@ -27,7 +27,7 @@ void W_OverkillHeavyMachineGun_Attack_Auto(Weapon thiswep, entity actor, .entity W_DecreaseAmmo(WEP_OVERKILL_HMG, actor, WEP_CVAR_PRI(WEP_OVERKILL_HMG, ammo), weaponentity); - W_SetupShot(actor, weaponentity, true, 0, SND_UZI_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(WEP_OVERKILL_HMG, damage), WEP_OVERKILL_HMG.m_id); + W_SetupShot(actor, weaponentity, true, 0, SND_HMG_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(WEP_OVERKILL_HMG, damage), WEP_OVERKILL_HMG.m_id); if(!autocvar_g_norecoil) { diff --git a/qcsrc/common/mutators/mutator/overkill/okhmg.qh b/qcsrc/common/mutators/mutator/overkill/okhmg.qh index 3a56f0257..2bde1c2a9 100644 --- a/qcsrc/common/mutators/mutator/overkill/okhmg.qh +++ b/qcsrc/common/mutators/mutator/overkill/okhmg.qh @@ -7,6 +7,8 @@ MODEL(HMG_MUZZLEFLASH, "models/uziflash.md3"); MODEL(HMG_VIEW, W_Model("h_ok_hmg.iqm")); MODEL(HMG_WORLD, W_Model("v_ok_hmg.md3")); MODEL(HMG_ITEM, W_Model("g_ok_hmg.md3")); + +SOUND(HMG_FIRE, W_Sound("uzi_fire")); #endif CLASS(OverkillHeavyMachineGun, Weapon) diff --git a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc index 041ea0b5d..1c6a76734 100644 --- a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc +++ b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc @@ -22,7 +22,7 @@ void W_OverkillMachineGun_Attack_Auto(Weapon thiswep, entity actor, .entity weap W_DecreaseAmmo(WEP_OVERKILL_MACHINEGUN, actor, WEP_CVAR_PRI(WEP_OVERKILL_MACHINEGUN, ammo), weaponentity); - W_SetupShot(actor, weaponentity, true, 0, SND_UZI_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(WEP_OVERKILL_MACHINEGUN, damage), WEP_OVERKILL_MACHINEGUN.m_id); + W_SetupShot(actor, weaponentity, true, 0, SND_OK_MG_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(WEP_OVERKILL_MACHINEGUN, damage), WEP_OVERKILL_MACHINEGUN.m_id); if(!autocvar_g_norecoil) { actor.punchangle_x = random() - 0.5; diff --git a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh index 742bc6076..ffa97c558 100644 --- a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh +++ b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh @@ -1,5 +1,13 @@ #pragma once +#ifdef GAMEQC +MODEL(OK_MG_VIEW, W_Model("h_ok_mg.iqm")); +MODEL(OK_MG_WORLD, W_Model("v_ok_mg.md3")); +MODEL(OK_MG_ITEM, W_Model("g_ok_mg.md3")); + +SOUND(OK_MG_FIRE, W_Sound("uzi_fire")); +#endif + CLASS(OverkillMachineGun, Weapon) /* spawnfunc */ ATTRIB(OverkillMachineGun, m_canonical_spawnfunc, string, "weapon_okmachinegun"); /* ammotype */ ATTRIB(OverkillMachineGun, ammo_type, Resource, RES_BULLETS); diff --git a/qcsrc/common/mutators/mutator/overkill/oknex.qc b/qcsrc/common/mutators/mutator/overkill/oknex.qc index 2b205fea9..799d6db98 100644 --- a/qcsrc/common/mutators/mutator/overkill/oknex.qc +++ b/qcsrc/common/mutators/mutator/overkill/oknex.qc @@ -83,10 +83,10 @@ void W_OverkillNex_Attack(Weapon thiswep, entity actor, .entity weaponentity, fl mydmg *= charge; myforce *= charge; - W_SetupShot(actor, weaponentity, true, 5, SND_NEXFIRE, CH_WEAPON_A, mydmg, thiswep.m_id); + W_SetupShot(actor, weaponentity, true, 5, SND_OK_NEX_FIRE, CH_WEAPON_A, mydmg, thiswep.m_id); if(charge > WEP_CVAR(WEP_OVERKILL_NEX, charge_animlimit) && WEP_CVAR(WEP_OVERKILL_NEX, charge_animlimit)) // if the OverkillNex is overcharged, we play an extra sound { - sound(actor, CH_WEAPON_B, SND_NEXCHARGE, VOL_BASE * (charge - 0.5 * WEP_CVAR(WEP_OVERKILL_NEX, charge_animlimit)) / (1 - 0.5 * WEP_CVAR(WEP_OVERKILL_NEX, charge_animlimit)), ATTN_NORM); + sound(actor, CH_WEAPON_B, SND_OK_NEX_CHARGE, VOL_BASE * (charge - 0.5 * WEP_CVAR(WEP_OVERKILL_NEX, charge_animlimit)) / (1 - 0.5 * WEP_CVAR(WEP_OVERKILL_NEX, charge_animlimit)), ATTN_NORM); } yoda = 0; @@ -332,7 +332,7 @@ METHOD(OverkillNex, wr_impacteffect, void(entity thiswep, entity actor)) vector org2 = w_org + w_backoff * 2; pointparticles(EFFECT_VORTEX_IMPACT, org2, '0 0 0', 1); if(!w_issilent) - sound(this, CH_SHOTS, SND_NEXIMPACT, VOL_BASE, ATTN_NORM); + sound(this, CH_SHOTS, SND_OK_NEX_IMPACT, VOL_BASE, ATTN_NORM); } METHOD(OverkillNex, wr_init, void(entity thiswep)) diff --git a/qcsrc/common/mutators/mutator/overkill/oknex.qh b/qcsrc/common/mutators/mutator/overkill/oknex.qh index 120f6d66d..e4b5f4814 100644 --- a/qcsrc/common/mutators/mutator/overkill/oknex.qh +++ b/qcsrc/common/mutators/mutator/overkill/oknex.qh @@ -1,5 +1,15 @@ #pragma once +#ifdef GAMEQC +MODEL(OK_NEX_VIEW, W_Model("h_ok_sniper.iqm")); +MODEL(OK_NEX_WORLD, W_Model("v_ok_sniper.md3")); +MODEL(OK_NEX_ITEM, W_Model("g_ok_sniper.md3")); + +SOUND(OK_NEX_CHARGE, W_Sound("nexcharge")); +SOUND(OK_NEX_FIRE, W_Sound("nexfire")); +SOUND(OK_NEX_IMPACT, W_Sound("neximpact")); +#endif + CLASS(OverkillNex, Weapon) /* spawnfunc */ ATTRIB(OverkillNex, m_canonical_spawnfunc, string, "weapon_oknex"); /* ammotype */ ATTRIB(OverkillNex, ammo_type, Resource, RES_CELLS); @@ -9,7 +19,7 @@ CLASS(OverkillNex, Weapon) /* color */ ATTRIB(OverkillNex, wpcolor, vector, '0.5 1 1'); /* modelname */ ATTRIB(OverkillNex, mdl, string, "ok_sniper"); #ifdef GAMEQC -/* model */ ATTRIB(OverkillNex, m_model, Model, MDL_OK_SNIPER_ITEM); +/* model */ ATTRIB(OverkillNex, m_model, Model, MDL_OK_NEX_ITEM); #endif /* crosshair */ ATTRIB(OverkillNex, w_crosshair, string, "gfx/crosshairnex"); /* crosshair */ ATTRIB(OverkillNex, w_crosshair_size, float, 0.65); diff --git a/qcsrc/common/mutators/mutator/overkill/okrpc.qc b/qcsrc/common/mutators/mutator/overkill/okrpc.qc index 46a783ce5..ce555d2ea 100644 --- a/qcsrc/common/mutators/mutator/overkill/okrpc.qc +++ b/qcsrc/common/mutators/mutator/overkill/okrpc.qc @@ -89,7 +89,7 @@ void W_OverkillRocketPropelledChainsaw_Attack(Weapon thiswep, entity actor, .ent entity missile = spawn(); //WarpZone_RefSys_SpawnSameRefSys(actor); W_DecreaseAmmo(thiswep, actor, WEP_CVAR_PRI(WEP_OVERKILL_RPC, ammo), weaponentity); - W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 5, SND_ROCKET_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(WEP_OVERKILL_RPC, damage), thiswep.m_id); + W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 5, SND_RPC_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(WEP_OVERKILL_RPC, damage), thiswep.m_id); W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir); PROJECTILE_MAKETRIGGER(missile); diff --git a/qcsrc/common/mutators/mutator/overkill/okrpc.qh b/qcsrc/common/mutators/mutator/overkill/okrpc.qh index d89ddf3db..b6611970a 100644 --- a/qcsrc/common/mutators/mutator/overkill/okrpc.qh +++ b/qcsrc/common/mutators/mutator/overkill/okrpc.qh @@ -7,6 +7,8 @@ MODEL(RPC_MUZZLEFLASH, "models/flash.md3"); MODEL(RPC_VIEW, W_Model("h_ok_rl.iqm")); MODEL(RPC_WORLD, W_Model("v_ok_rl.md3")); MODEL(RPC_ITEM, W_Model("g_ok_rl.md3")); + +SOUND(RPC_FIRE, W_Sound("rocket_fire")); #endif CLASS(OverkillRocketPropelledChainsaw, Weapon) diff --git a/qcsrc/common/mutators/mutator/overkill/okshotgun.qh b/qcsrc/common/mutators/mutator/overkill/okshotgun.qh index 7dd68a731..e1ca020d2 100644 --- a/qcsrc/common/mutators/mutator/overkill/okshotgun.qh +++ b/qcsrc/common/mutators/mutator/overkill/okshotgun.qh @@ -1,5 +1,11 @@ #pragma once +#ifdef GAMEQC +MODEL(OK_SHOTGUN_VIEW, W_Model("h_ok_shotgun.iqm")); +MODEL(OK_SHOTGUN_WORLD, W_Model("v_ok_shotgun.md3")); +MODEL(OK_SHOTGUN_ITEM, W_Model("g_ok_shotgun.md3")); +#endif + CLASS(OverkillShotgun, Weapon) /* spawnfunc */ ATTRIB(OverkillShotgun, m_canonical_spawnfunc, string, "weapon_okshotgun"); /* ammotype */ ATTRIB(OverkillShotgun, ammo_type, Resource, RES_SHELLS); diff --git a/qcsrc/common/mutators/mutator/touchexplode/sv_touchexplode.qc b/qcsrc/common/mutators/mutator/touchexplode/sv_touchexplode.qc index 5d46a9edf..2a00246bc 100644 --- a/qcsrc/common/mutators/mutator/touchexplode/sv_touchexplode.qc +++ b/qcsrc/common/mutators/mutator/touchexplode/sv_touchexplode.qc @@ -6,6 +6,8 @@ float autocvar_g_touchexplode_damage; float autocvar_g_touchexplode_edgedamage; float autocvar_g_touchexplode_force; +SOUND(TOUCHEXPLODE, W_Sound("grenade_impact")); + REGISTER_MUTATOR(touchexplode, expr_evaluate(autocvar_g_touchexplode)); .float touchexplode_time; @@ -15,7 +17,7 @@ void PlayerTouchExplode(entity p1, entity p2) vector org = (p1.origin + p2.origin) * 0.5; org.z += (p1.mins.z + p2.mins.z) * 0.5; - sound(p1, CH_TRIGGER, SND_GRENADE_IMPACT, VOL_BASE, ATTEN_NORM); + sound(p1, CH_TRIGGER, SND_TOUCHEXPLODE, VOL_BASE, ATTEN_NORM); Send_Effect(EFFECT_EXPLOSION_SMALL, org, '0 0 0', 1); entity e = spawn(); diff --git a/qcsrc/common/sounds/all.inc b/qcsrc/common/sounds/all.inc index f4277a666..4af86ab29 100644 --- a/qcsrc/common/sounds/all.inc +++ b/qcsrc/common/sounds/all.inc @@ -7,31 +7,7 @@ string W_Sound(string w_snd); string Item_Sound(string it_snd); -SOUND(ARC_FIRE, W_Sound("arc_fire")); -SOUND(ARC_LOOP, W_Sound("arc_loop")); -SOUND(ARC_LOOP_OVERHEAT, W_Sound("arc_loop_overheat")); -SOUND(ARC_STOP, W_Sound("arc_stop")); -SOUND(CAMPINGRIFLE_FIRE2, W_Sound("campingrifle_fire2")); -SOUND(CAMPINGRIFLE_FIRE, W_Sound("campingrifle_fire")); -SOUND(CRYLINK_FIRE2, W_Sound("crylink_fire2")); -SOUND(CRYLINK_FIRE, W_Sound("crylink_fire")); -SOUND(CRYLINK_IMPACT2, W_Sound("crylink_impact2")); -SOUND(CRYLINK_IMPACT, W_Sound("crylink_impact")); -SOUND(CRYLINK_LINKJOIN, W_Sound("crylink_linkjoin")); SOUND(DRYFIRE, W_Sound("dryfire")); -SOUND(ELECTRO_BOUNCE, W_Sound("electro_bounce")); -SOUND(ELECTRO_FIRE2, W_Sound("electro_fire2")); -SOUND(ELECTRO_FIRE, W_Sound("electro_fire")); -SOUND(ELECTRO_FLY, W_Sound("electro_fly")); -SOUND(ELECTRO_IMPACT, W_Sound("electro_impact")); -SOUND(ELECTRO_IMPACT_COMBO, W_Sound("electro_impact_combo")); -SOUND(FIREBALL_FIRE2, W_Sound("fireball_fire2")); -SOUND(FIREBALL_FIRE, W_Sound("fireball_fire")); -SOUND(FIREBALL_FLY2, W_Sound("fireball_fly2")); -SOUND(FIREBALL_FLY, W_Sound("fireball_fly")); -SOUND(FIREBALL_IMPACT2, W_Sound("fireball_impact2")); -SOUND(FIREBALL_PREFIRE2, W_Sound("fireball_prefire2")); -SOUND(FLAC_FIRE, W_Sound("flac_fire")); SOUND(GRENADE_BOUNCE1, W_Sound("grenade_bounce1")); SOUND(GRENADE_BOUNCE2, W_Sound("grenade_bounce2")); SOUND(GRENADE_BOUNCE3, W_Sound("grenade_bounce3")); @@ -41,35 +17,8 @@ SOUND(GRENADE_BOUNCE6, W_Sound("grenade_bounce6")); Sound SND_GRENADE_BOUNCE_RANDOM() { return REGISTRY_GET(Sounds, SND_GRENADE_BOUNCE1.m_id + rint(random() * 5)); } -SOUND(GRENADE_FIRE, W_Sound("grenade_fire")); -SOUND(GRENADE_IMPACT, W_Sound("grenade_impact")); -SOUND(GRENADE_STICK, W_Sound("grenade_stick")); -SOUND(HAGAR_BEEP, W_Sound("hagar_beep")); -SOUND(HAGAR_FIRE, W_Sound("hagar_fire")); -SOUND(HAGAR_LOAD, W_Sound("hagar_load")); -SOUND(HAGEXP1, W_Sound("hagexp1")); -SOUND(HAGEXP2, W_Sound("hagexp2")); -SOUND(HAGEXP3, W_Sound("hagexp3")); -Sound SND_HAGEXP_RANDOM() { - return REGISTRY_GET(Sounds, SND_HAGEXP1.m_id + rint(random() * 2)); -} -SOUND(HOOKBOMB_FIRE, W_Sound("hookbomb_fire")); -SOUND(HOOKBOMB_IMPACT, W_Sound("hookbomb_impact")); -SOUND(HOOK_FIRE, W_Sound("hook_fire")); -SOUND(HOOK_IMPACT, W_Sound("hook_impact")); -SOUND(LASERGUN_FIRE, W_Sound("lasergun_fire")); SOUND(LASERIMPACT, W_Sound("laserimpact")); -SOUND(LGBEAM_FLY, W_Sound("lgbeam_fly")); -SOUND(MINE_DET, W_Sound("mine_det")); -SOUND(MINE_EXP, W_Sound("mine_exp")); -SOUND(MINE_FIRE, W_Sound("mine_fire")); -SOUND(MINE_STICK, W_Sound("mine_stick")); -SOUND(MINE_TRIGGER, W_Sound("mine_trigger")); -SOUND(MINSTANEXFIRE, W_Sound("minstanexfire")); -SOUND(NEXCHARGE, W_Sound("nexcharge")); -SOUND(NEXFIRE, W_Sound("nexfire")); -SOUND(NEXIMPACT, W_Sound("neximpact")); SOUND(NEXWHOOSH1, W_Sound("nexwhoosh1")); SOUND(NEXWHOOSH2, W_Sound("nexwhoosh2")); SOUND(NEXWHOOSH3, W_Sound("nexwhoosh3")); @@ -85,26 +34,9 @@ Sound SND_RIC_RANDOM() { return REGISTRY_GET(Sounds, SND_RIC1.m_id + rint(random() * 2)); } -SOUND(ROCKET_DET, W_Sound("rocket_det")); -SOUND(ROCKET_FIRE, W_Sound("rocket_fire")); -SOUND(ROCKET_FLY, W_Sound("rocket_fly")); SOUND(ROCKET_IMPACT, W_Sound("rocket_impact")); -SOUND(ROCKET_MODE, W_Sound("rocket_mode")); -SOUND(SEEKEREXP1, W_Sound("seekerexp1")); -SOUND(SEEKEREXP2, W_Sound("seekerexp2")); -SOUND(SEEKEREXP3, W_Sound("seekerexp3")); -SOUND(SEEKER_FIRE, W_Sound("seeker_fire")); -SOUND(SHOTGUN_FIRE, W_Sound("shotgun_fire")); -SOUND(SHOTGUN_MELEE, W_Sound("shotgun_melee")); SOUND(STRENGTH_FIRE, W_Sound("strength_fire")); -SOUND(TAGEXP1, W_Sound("tagexp1")); -SOUND(TAGEXP2, W_Sound("tagexp2")); -SOUND(TAGEXP3, W_Sound("tagexp3")); -SOUND(TAG_FIRE, W_Sound("tag_fire")); -SOUND(TAG_IMPACT, W_Sound("tag_impact")); -SOUND(TAG_ROCKET_FLY, W_Sound("tag_rocket_fly")); SOUND(UNAVAILABLE, W_Sound("unavailable")); -SOUND(UZI_FIRE, W_Sound("uzi_fire")); SOUND(WEAPONPICKUP, W_Sound("weaponpickup")); SOUND(WEAPONPICKUP_NEW_TOYS, W_Sound("weaponpickup_new_toys")); SOUND(WEAPON_SWITCH, W_Sound("weapon_switch")); @@ -202,30 +134,36 @@ SOUND(ONS_ELECTRICITY_EXPLODE, "onslaught/electricity_explode"); //SOUND(ONS_GENERATOR_ALARM, "kh/alarm"); // FIXME: unique sound SOUND(ONS_GENERATOR_DECAY, "onslaught/generator_decay"); SOUND(ONS_GENERATOR_UNDERATTACK, "onslaught/generator_underattack"); +SOUND(ONS_GENERATOR_EXPLODE, W_Sound("grenade_impact")); SOUND(ONS_HIT1, "onslaught/ons_hit1"); SOUND(ONS_HIT2, "onslaught/ons_hit2"); SOUND(ONS_SPARK1, "onslaught/ons_spark1"); SOUND(ONS_SPARK2, "onslaught/ons_spark2"); SOUND(ONS_SHOCKWAVE, "onslaught/shockwave"); -SOUND(PORTO_BOUNCE, "porto/bounce"); -SOUND(PORTO_CREATE, "porto/create"); -SOUND(PORTO_EXPIRE, "porto/expire"); -SOUND(PORTO_EXPLODE, "porto/explode"); -SOUND(PORTO_FIRE, "porto/fire"); -SOUND(PORTO_UNSUPPORTED, "porto/unsupported"); +SOUND(MON_GOLEM_LIGHTNING_IMPACT, W_Sound("electro_impact")); +SOUND(FLACEXP1, W_Sound("hagexp1")); +SOUND(FLACEXP2, W_Sound("hagexp2")); +SOUND(FLACEXP3, W_Sound("hagexp3")); +Sound SND_FLACEXP_RANDOM() { + return REGISTRY_GET(Sounds, SND_FLACEXP1.m_id + rint(random() * 2)); +} SOUND(TUR_PHASER, "turrets/phaser"); +SOUND(TUR_PLASMA_IMPACT, W_Sound("electro_impact")); +SOUND(TUR_WALKER_FIRE, W_Sound("hagar_fire")); SOUND(VEH_ALARM, "vehicles/alarm"); SOUND(VEH_ALARM_SHIELD, "vehicles/alarm_shield"); SOUND(VEH_MISSILE_ALARM, "vehicles/missile_alarm"); SOUND(VEH_BUMBLEBEE_FIRE, W_Sound("flacexp3")); +SOUND(VEH_BUMBLEBEE_IMPACT, W_Sound("fireball_impact2")); SOUND(VEH_RACER_BOOST, "vehicles/racer_boost"); SOUND(VEH_RACER_IDLE, "vehicles/racer_idle"); SOUND(VEH_RACER_MOVE, "vehicles/racer_move"); +SOUND(VEH_RACER_ROCKET_FLY, W_Sound("tag_rocket_fly")); SOUND(VEH_RAPTOR_FLY, "vehicles/raptor_fly"); SOUND(VEH_RAPTOR_SPEED, "vehicles/raptor_speed"); @@ -236,10 +174,18 @@ SOUND(VEH_SPIDERBOT_JUMP, "vehicles/spiderbot_jump"); SOUND(VEH_SPIDERBOT_LAND, "vehicles/spiderbot_land"); SOUND(VEH_SPIDERBOT_STRAFE, "vehicles/spiderbot_strafe"); SOUND(VEH_SPIDERBOT_WALK, "vehicles/spiderbot_walk"); +SOUND(VEH_SPIDERBOT_MINIGUN_FIRE, W_Sound("uzi_fire")); +SOUND(VEH_SPIDERBOT_ROCKET_FLY, W_Sound("tag_rocket_fly")); +SOUND(VEH_SPIDERBOT_ROCKET_FIRE, W_Sound("rocket_fire")); SOUND(NADE_BEEP, "overkill/grenadebip"); + // FIXME: unique sounds #define SND_NADE_BONUS SND_KH_ALARM -//SOUND(NADE_BONUS, "kh/alarm"); // FIXME: unique sound +//SOUND(NADE_BONUS, "kh/alarm"); +#define SND_NADE_NAPALM_FIRE SND_FIREBALL_FIRE +//SOUND(NADE_NAPALM_FIRE, W_Sound("fireball_fire")); +#define SND_NADE_NAPALM_FLY SND_FIREBALL_FLY2 +//SOUND(NADE_NAPALM_FLY, W_Sound("fireball_fly2")); SOUND(BUFF_LOST, "relics/relic_effect"); diff --git a/qcsrc/common/turrets/turret/ewheel_weapon.qc b/qcsrc/common/turrets/turret/ewheel_weapon.qc index 924e23d0c..483bb214d 100644 --- a/qcsrc/common/turrets/turret/ewheel_weapon.qc +++ b/qcsrc/common/turrets/turret/ewheel_weapon.qc @@ -3,7 +3,7 @@ #ifdef SVQC void turret_initparams(entity); -SOUND(EWheelAttack_FIRE, W_Sound("electro_fire")); +SOUND(EWheelAttack_FIRE, W_Sound("lasergun_fire")); METHOD(EWheelAttack, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { bool isPlayer = IS_PLAYER(actor); if (fire & 1) @@ -19,7 +19,7 @@ METHOD(EWheelAttack, wr_think, void(entity thiswep, entity actor, .entity weapon turret_do_updates(actor); - entity missile = turret_projectile(actor, SND_LASERGUN_FIRE, 1, 0, DEATH_TURRET_EWHEEL.m_id, PROJECTILE_BLASTER, true, true); + entity missile = turret_projectile(actor, SND_EWheelAttack_FIRE, 1, 0, DEATH_TURRET_EWHEEL.m_id, PROJECTILE_BLASTER, true, true); missile.missile_flags = MIF_SPLASH; Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, actor.tur_shotorg, actor.tur_shotdir_updated * 1000, 1); diff --git a/qcsrc/common/turrets/turret/flac_weapon.qc b/qcsrc/common/turrets/turret/flac_weapon.qc index c1940ad7f..14f99f6e5 100644 --- a/qcsrc/common/turrets/turret/flac_weapon.qc +++ b/qcsrc/common/turrets/turret/flac_weapon.qc @@ -3,7 +3,7 @@ #ifdef SVQC void turret_flac_projectile_think_explode(entity this); -SOUND(FlacAttack_FIRE, W_Sound("electro_fire")); +SOUND(FlacAttack_FIRE, W_Sound("hagar_fire")); METHOD(FlacAttack, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { bool isPlayer = IS_PLAYER(actor); if (fire & 1) @@ -20,7 +20,7 @@ METHOD(FlacAttack, wr_think, void(entity thiswep, entity actor, .entity weaponen turret_tag_fire_update(actor); - entity proj = turret_projectile(actor, SND_HAGAR_FIRE, 5, 0, DEATH_TURRET_FLAC.m_id, PROJECTILE_HAGAR, true, true); + entity proj = turret_projectile(actor, SND_FlacAttack_FIRE, 5, 0, DEATH_TURRET_FLAC.m_id, PROJECTILE_HAGAR, true, true); proj.missile_flags = MIF_SPLASH | MIF_PROXY; setthink(proj, turret_flac_projectile_think_explode); proj.nextthink = time + actor.tur_impacttime + (random() * 0.01 - random() * 0.01); diff --git a/qcsrc/common/turrets/turret/hellion_weapon.qc b/qcsrc/common/turrets/turret/hellion_weapon.qc index 0fc190a2c..afe862b7e 100644 --- a/qcsrc/common/turrets/turret/hellion_weapon.qc +++ b/qcsrc/common/turrets/turret/hellion_weapon.qc @@ -6,7 +6,7 @@ float autocvar_g_turrets_unit_hellion_shot_speed_gain; float autocvar_g_turrets_unit_hellion_shot_speed_max; void turret_hellion_missile_think(entity this); -SOUND(HellionAttack_FIRE, W_Sound("electro_fire")); +SOUND(HellionAttack_FIRE, W_Sound("rocket_fire")); METHOD(HellionAttack, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { bool isPlayer = IS_PLAYER(actor); if (fire & 1) @@ -27,7 +27,7 @@ METHOD(HellionAttack, wr_think, void(entity thiswep, entity actor, .entity weapo actor.tur_shotorg = gettaginfo(actor.tur_head, gettagindex(actor.tur_head, "tag_fire2")); } - entity missile = turret_projectile(actor, SND_ROCKET_FIRE, 6, 10, DEATH_TURRET_HELLION.m_id, PROJECTILE_ROCKET, false, false); + entity missile = turret_projectile(actor, SND_HellionAttack_FIRE, 6, 10, DEATH_TURRET_HELLION.m_id, PROJECTILE_ROCKET, false, false); te_explosion (missile.origin); setthink(missile, turret_hellion_missile_think); missile.nextthink = time; diff --git a/qcsrc/common/turrets/turret/hk_weapon.qc b/qcsrc/common/turrets/turret/hk_weapon.qc index 8a66d098e..dc77480be 100644 --- a/qcsrc/common/turrets/turret/hk_weapon.qc +++ b/qcsrc/common/turrets/turret/hk_weapon.qc @@ -10,7 +10,7 @@ float autocvar_g_turrets_unit_hk_shot_speed_max; float autocvar_g_turrets_unit_hk_shot_speed_turnrate; void turret_hk_missile_think(entity this); -SOUND(HunterKillerAttack_FIRE, W_Sound("electro_fire")); +SOUND(HunterKillerAttack_FIRE, W_Sound("rocket_fire")); METHOD(HunterKillerAttack, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { bool isPlayer = IS_PLAYER(actor); @@ -24,7 +24,7 @@ METHOD(HunterKillerAttack, wr_think, void(entity thiswep, entity actor, .entity actor.tur_head = actor; weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(WEP_ELECTRO, animtime), w_ready); } - entity missile = turret_projectile(actor, SND_ROCKET_FIRE, 6, 10, DEATH_TURRET_HK.m_id, PROJECTILE_ROCKET, false, false); + entity missile = turret_projectile(actor, SND_HunterKillerAttack_FIRE, 6, 10, DEATH_TURRET_HK.m_id, PROJECTILE_ROCKET, false, false); te_explosion (missile.origin); setthink(missile, turret_hk_missile_think); diff --git a/qcsrc/common/turrets/turret/mlrs_weapon.qc b/qcsrc/common/turrets/turret/mlrs_weapon.qc index 526caccdd..e40b888b9 100644 --- a/qcsrc/common/turrets/turret/mlrs_weapon.qc +++ b/qcsrc/common/turrets/turret/mlrs_weapon.qc @@ -1,7 +1,7 @@ #include "mlrs_weapon.qh" #ifdef SVQC -SOUND(MLRSTurretAttack_FIRE, W_Sound("electro_fire")); +SOUND(MLRSTurretAttack_FIRE, W_Sound("rocket_fire")); METHOD(MLRSTurretAttack, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { bool isPlayer = IS_PLAYER(actor); @@ -17,7 +17,7 @@ METHOD(MLRSTurretAttack, wr_think, void(entity thiswep, entity actor, .entity we weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, 0, w_ready); } turret_tag_fire_update(actor); - entity missile = turret_projectile(actor, SND_ROCKET_FIRE, 6, 10, DEATH_TURRET_MLRS.m_id, PROJECTILE_ROCKET, true, true); + entity missile = turret_projectile(actor, SND_MLRSTurretAttack_FIRE, 6, 10, DEATH_TURRET_MLRS.m_id, PROJECTILE_ROCKET, true, true); missile.nextthink = time + max(actor.tur_impacttime,(actor.shot_radius * 2) / actor.shot_speed); missile.missile_flags = MIF_SPLASH; te_explosion (missile.origin); diff --git a/qcsrc/common/turrets/turret/phaser_weapon.qc b/qcsrc/common/turrets/turret/phaser_weapon.qc index be08f4b17..1fa382fe3 100644 --- a/qcsrc/common/turrets/turret/phaser_weapon.qc +++ b/qcsrc/common/turrets/turret/phaser_weapon.qc @@ -5,6 +5,7 @@ void beam_think(entity this); .int fireflag; SOUND(PhaserTurretAttack_FIRE, W_Sound("electro_fire")); +SOUND(PhaserTurretAttack_IMPACT, W_Sound("neximpact")); METHOD(PhaserTurretAttack, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { bool isPlayer = IS_PLAYER(actor); @@ -43,7 +44,7 @@ METHOD(PhaserTurretAttack, wr_think, void(entity thiswep, entity actor, .entity setattachment(beam, actor.tur_head, "tag_fire"); - soundat (actor, trace_endpos, CH_SHOTS, SND(NEXIMPACT), VOL_BASE, ATTEN_NORM); + soundat (actor, trace_endpos, CH_SHOTS, SND(PhaserTurretAttack_IMPACT), VOL_BASE, ATTEN_NORM); if (!isPlayer) if (actor.tur_head.frame == 0) actor.tur_head.frame = 1; diff --git a/qcsrc/common/turrets/turret/plasma_weapon.qc b/qcsrc/common/turrets/turret/plasma_weapon.qc index 5dd6f1e3b..48c924c36 100644 --- a/qcsrc/common/turrets/turret/plasma_weapon.qc +++ b/qcsrc/common/turrets/turret/plasma_weapon.qc @@ -1,7 +1,7 @@ #include "plasma_weapon.qh" #ifdef SVQC -SOUND(PlasmaAttack_FIRE, W_Sound("electro_fire")); +SOUND(PlasmaAttack_FIRE, W_Sound("hagar_fire")); METHOD(PlasmaAttack, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { bool isPlayer = IS_PLAYER(actor); if (fire & 1) @@ -14,7 +14,7 @@ METHOD(PlasmaAttack, wr_think, void(entity thiswep, entity actor, .entity weapon actor.tur_head = actor; weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(WEP_ELECTRO, animtime), w_ready); } - entity missile = turret_projectile(actor, SND_HAGAR_FIRE, 1, 0, DEATH_TURRET_PLASMA.m_id, PROJECTILE_ELECTRO_BEAM, true, true); + entity missile = turret_projectile(actor, SND_PlasmaAttack_FIRE, 1, 0, DEATH_TURRET_PLASMA.m_id, PROJECTILE_ELECTRO_BEAM, true, true); missile.missile_flags = MIF_SPLASH; Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, actor.tur_shotorg, actor.tur_shotdir_updated * 1000, 1); } diff --git a/qcsrc/common/turrets/turret/walker.qc b/qcsrc/common/turrets/turret/walker.qc index 8e347f962..2b9864bcf 100644 --- a/qcsrc/common/turrets/turret/walker.qc +++ b/qcsrc/common/turrets/turret/walker.qc @@ -210,7 +210,7 @@ void walker_fire_rocket(entity this, vector org) entity rocket = new(walker_rocket); setorigin(rocket, org); rocket.solid = SOLID_BBOX; // before setsize so it will be linked to the area grid - sound (this, CH_WEAPON_A, SND_HAGAR_FIRE, VOL_BASE, ATTEN_NORM); + sound (this, CH_WEAPON_A, SND_TUR_WALKER_FIRE, VOL_BASE, ATTEN_NORM); setsize (rocket, '-3 -3 -3', '3 3 3'); // give it some size so it can be shot rocket.owner = this; diff --git a/qcsrc/common/turrets/turret/walker_weapon.qc b/qcsrc/common/turrets/turret/walker_weapon.qc index 320118c86..21356d0f7 100644 --- a/qcsrc/common/turrets/turret/walker_weapon.qc +++ b/qcsrc/common/turrets/turret/walker_weapon.qc @@ -2,7 +2,7 @@ #ifdef SVQC -SOUND(WalkerTurretAttack_FIRE, W_Sound("electro_fire")); +SOUND(WalkerTurretAttack_FIRE, W_Sound("uzi_fire")); METHOD(WalkerTurretAttack, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { bool isPlayer = IS_PLAYER(actor); if (fire & 1) @@ -15,7 +15,7 @@ METHOD(WalkerTurretAttack, wr_think, void(entity thiswep, entity actor, .entity actor.tur_head = actor; weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(WEP_ELECTRO, animtime), w_ready); } - sound (actor, CH_WEAPON_A, SND_UZI_FIRE, VOL_BASE, ATTEN_NORM); + sound (actor, CH_WEAPON_A, SND_WalkerTurretAttack_FIRE, VOL_BASE, ATTEN_NORM); fireBullet(actor, weaponentity, actor.tur_shotorg, actor.tur_shotdir_updated, actor.shot_spread, 0, actor.shot_dmg, 0, actor.shot_force, DEATH_TURRET_WALK_GUN.m_id, EFFECT_BULLET); Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, actor.tur_shotorg, actor.tur_shotdir_updated * 1000, 1); } diff --git a/qcsrc/common/vehicles/vehicle/racer_weapon.qc b/qcsrc/common/vehicles/vehicle/racer_weapon.qc index e8c18ed2d..784102d13 100644 --- a/qcsrc/common/vehicles/vehicle/racer_weapon.qc +++ b/qcsrc/common/vehicles/vehicle/racer_weapon.qc @@ -3,6 +3,8 @@ #ifdef SVQC void racer_fire_rocket(entity this, entity player, vector org, vector dir, entity trg); +SOUND(RacerAttack_LASER_FIRE, W_Sound("lasergun_fire")); +SOUND(RacerAttack_ROCKET_FIRE, W_Sound("rocket_fire")); METHOD(RacerAttack, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { bool isPlayer = IS_PLAYER(actor); @@ -30,7 +32,7 @@ METHOD(RacerAttack, wr_think, void(entity thiswep, entity actor, .entity weapone if (isPlayer) W_SetupShot_Dir(player, weaponentity, v_forward, false, 0, SND_Null, CH_WEAPON_B, 0, DEATH_VH_WAKI_GUN.m_id); vector org = w_shotorg; vector dir = w_shotdir; - entity bolt = vehicles_projectile(((veh) ? veh : player), EFFECT_RACER_MUZZLEFLASH, SND_LASERGUN_FIRE, + entity bolt = vehicles_projectile(((veh) ? veh : player), EFFECT_RACER_MUZZLEFLASH, SND_RacerAttack_LASER_FIRE, org, normalize(v_forward + randomvec() * autocvar_g_vehicle_racer_cannon_spread) * autocvar_g_vehicle_racer_cannon_speed, autocvar_g_vehicle_racer_cannon_damage, autocvar_g_vehicle_racer_cannon_radius, autocvar_g_vehicle_racer_cannon_force, 0, DEATH_VH_WAKI_GUN.m_id, PROJECTILE_WAKICANNON, 0, true, true, player); @@ -58,7 +60,7 @@ void racer_rocket_groundhugger(entity this); void racer_fire_rocket(entity this, entity player, vector org, vector dir, entity trg) { - entity rocket = vehicles_projectile(this, EFFECT_RACER_ROCKETLAUNCH, SND_ROCKET_FIRE, + entity rocket = vehicles_projectile(this, EFFECT_RACER_ROCKETLAUNCH, SND_RacerAttack_ROCKET_FIRE, org, dir * autocvar_g_vehicle_racer_rocket_speed, autocvar_g_vehicle_racer_rocket_damage, autocvar_g_vehicle_racer_rocket_radius, autocvar_g_vehicle_racer_rocket_force, 3, DEATH_VH_WAKI_ROCKET.m_id, PROJECTILE_WAKIROCKET, 20, false, false, player); diff --git a/qcsrc/common/vehicles/vehicle/raptor_weapons.qc b/qcsrc/common/vehicles/vehicle/raptor_weapons.qc index dc2f293d6..aaf171ba7 100644 --- a/qcsrc/common/vehicles/vehicle/raptor_weapons.qc +++ b/qcsrc/common/vehicles/vehicle/raptor_weapons.qc @@ -2,6 +2,7 @@ #ifdef SVQC +SOUND(RaptorCannon_FIRE, W_Sound("lasergun_fire")); METHOD(RaptorCannon, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { bool isPlayer = IS_PLAYER(actor); entity player = isPlayer ? actor : actor.owner; @@ -21,14 +22,14 @@ METHOD(RaptorCannon, wr_think, void(entity thiswep, entity actor, .entity weapon veh.vehicle_energy -= autocvar_g_vehicle_raptor_cannon_cost; actor.cnt = time; } - vehicles_projectile(veh, EFFECT_RAPTOR_MUZZLEFLASH, SND_LASERGUN_FIRE, + vehicles_projectile(veh, EFFECT_RAPTOR_MUZZLEFLASH, SND_RaptorCannon_FIRE, org, normalize(dir + randomvec() * autocvar_g_vehicle_raptor_cannon_spread) * autocvar_g_vehicle_raptor_cannon_speed, autocvar_g_vehicle_raptor_cannon_damage, autocvar_g_vehicle_raptor_cannon_radius, autocvar_g_vehicle_raptor_cannon_force, 0, DEATH_VH_RAPT_CANNON.m_id, PROJECTILE_RAPTORCANNON, 0, true, true, player); weapon_thinkf(player, weaponentity, WFRAME_FIRE1, 0, w_ready); } } -METHOD(RaptorCannon, wr_checkammo1, bool(RacerAttack thiswep, entity actor, .entity weaponentity)) { +METHOD(RaptorCannon, wr_checkammo1, bool(RaptorCannon thiswep, entity actor, .entity weaponentity)) { bool isPlayer = IS_PLAYER(actor); entity player = isPlayer ? actor : actor.owner; entity veh = player.vehicle; diff --git a/qcsrc/common/vehicles/vehicle/spiderbot.qc b/qcsrc/common/vehicles/vehicle/spiderbot.qc index be1229da2..b61c11669 100644 --- a/qcsrc/common/vehicles/vehicle/spiderbot.qc +++ b/qcsrc/common/vehicles/vehicle/spiderbot.qc @@ -271,7 +271,7 @@ bool spiderbot_frame(entity this, float dt) fireBullet(this, weaponentity, v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_solidpenetration, autocvar_g_vehicle_spiderbot_minigun_damage, 0, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_VH_SPID_MINIGUN.m_id, EFFECT_BULLET); - sound (gun, CH_WEAPON_A, SND_UZI_FIRE, VOL_BASE, ATTEN_NORM); + sound (gun, CH_WEAPON_A, SND_VEH_SPIDERBOT_MINIGUN_FIRE, VOL_BASE, ATTEN_NORM); //trailparticles(this, _particleeffectnum("spiderbot_minigun_trail"), v, trace_endpos); Send_Effect(EFFECT_SPIDERBOT_MINIGUN_MUZZLEFLASH, v, v_forward * 2500, 1); diff --git a/qcsrc/common/vehicles/vehicle/spiderbot_weapons.qc b/qcsrc/common/vehicles/vehicle/spiderbot_weapons.qc index fdeddc47b..6ef76f5d3 100644 --- a/qcsrc/common/vehicles/vehicle/spiderbot_weapons.qc +++ b/qcsrc/common/vehicles/vehicle/spiderbot_weapons.qc @@ -183,7 +183,7 @@ void spiderbot_rocket_do(entity this) switch(STAT(VEHICLESTAT_W2MODE, this)) { case SBRM_VOLLY: - rocket = vehicles_projectile(this, EFFECT_SPIDERBOT_ROCKETLAUNCH, SND_ROCKET_FIRE, + rocket = vehicles_projectile(this, EFFECT_SPIDERBOT_ROCKETLAUNCH, SND_VEH_SPIDERBOT_ROCKET_FIRE, v, normalize(randomvec() * autocvar_g_vehicle_spiderbot_rocket_spread + v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed, autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1, DEATH_VH_SPID_ROCKET.m_id, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, true, this.owner); @@ -197,7 +197,7 @@ void spiderbot_rocket_do(entity this) this.wait = -10; break; case SBRM_GUIDE: - rocket = vehicles_projectile(this, EFFECT_SPIDERBOT_ROCKETLAUNCH, SND_ROCKET_FIRE, + rocket = vehicles_projectile(this, EFFECT_SPIDERBOT_ROCKETLAUNCH, SND_VEH_SPIDERBOT_ROCKET_FIRE, v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed, autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1, DEATH_VH_SPID_ROCKET.m_id, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, false, this.owner); @@ -209,7 +209,7 @@ void spiderbot_rocket_do(entity this) break; case SBRM_ARTILLERY: - rocket = vehicles_projectile(this, EFFECT_SPIDERBOT_ROCKETLAUNCH, SND_ROCKET_FIRE, + rocket = vehicles_projectile(this, EFFECT_SPIDERBOT_ROCKETLAUNCH, SND_VEH_SPIDERBOT_ROCKET_FIRE, v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed, autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1, DEATH_VH_SPID_ROCKET.m_id, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, true, this.owner); diff --git a/qcsrc/common/weapons/weapon/arc.qc b/qcsrc/common/weapons/weapon/arc.qc index c97860003..24453422a 100644 --- a/qcsrc/common/weapons/weapon/arc.qc +++ b/qcsrc/common/weapons/weapon/arc.qc @@ -136,7 +136,7 @@ void W_Arc_Bolt_Touch(entity this, entity toucher) void W_Arc_Attack_Bolt(Weapon thiswep, entity actor, .entity weaponentity, int fire) { - W_SetupShot(actor, weaponentity, false, 2, SND_ELECTRO_FIRE2, CH_WEAPON_A, WEP_CVAR(WEP_ARC, bolt_damage), thiswep.m_id | HITTYPE_SECONDARY); + W_SetupShot(actor, weaponentity, false, 2, SND_ARC_BOLT_FIRE, CH_WEAPON_A, WEP_CVAR(WEP_ARC, bolt_damage), thiswep.m_id | HITTYPE_SECONDARY); W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir); @@ -763,7 +763,7 @@ METHOD(Arc, wr_impacteffect, void(entity thiswep, entity actor)) { vector org2 = w_org + w_backoff * 2; pointparticles(EFFECT_ELECTRO_IMPACT, org2, w_backoff * 1000, 1); - if(!w_issilent) { sound(actor, CH_SHOTS, SND_ELECTRO_IMPACT, VOL_BASE, ATTN_NORM); } + if(!w_issilent) { sound(actor, CH_SHOTS, SND_ARC_BOLT_IMPACT, VOL_BASE, ATTN_NORM); } } } diff --git a/qcsrc/common/weapons/weapon/arc.qh b/qcsrc/common/weapons/weapon/arc.qh index 1c3a72393..484fabceb 100644 --- a/qcsrc/common/weapons/weapon/arc.qh +++ b/qcsrc/common/weapons/weapon/arc.qh @@ -5,6 +5,13 @@ MODEL(ARC_MUZZLEFLASH, "models/flash.md3"); MODEL(ARC_VIEW, W_Model("h_arc.iqm")); MODEL(ARC_WORLD, W_Model("v_arc.md3")); MODEL(ARC_ITEM, W_Model("g_arc.md3")); + +SOUND(ARC_BOLT_FIRE, W_Sound("electro_fire2")); +SOUND(ARC_BOLT_IMPACT, W_Sound("electro_impact")); +SOUND(ARC_FIRE, W_Sound("arc_fire")); +SOUND(ARC_LOOP, W_Sound("arc_loop")); +SOUND(ARC_LOOP_OVERHEAT, W_Sound("arc_loop_overheat")); +SOUND(ARC_STOP, W_Sound("arc_stop")); #endif CLASS(Arc, Weapon) diff --git a/qcsrc/common/weapons/weapon/blaster.qc b/qcsrc/common/weapons/weapon/blaster.qc index 63e735b3b..d426ae51e 100644 --- a/qcsrc/common/weapons/weapon/blaster.qc +++ b/qcsrc/common/weapons/weapon/blaster.qc @@ -47,7 +47,7 @@ void W_Blaster_Attack(entity actor, .entity weaponentity) vector s_forward = v_forward * cos(atk_shotangle) + v_up * sin(atk_shotangle); int atk_deathtype = WEP_BLASTER.m_id; - W_SetupShot_Dir(actor, weaponentity, s_forward, false, 3, SND_LASERGUN_FIRE, CH_WEAPON_B, atk_damage, atk_deathtype); + W_SetupShot_Dir(actor, weaponentity, s_forward, false, 3, SND_BLASTER_FIRE, CH_WEAPON_B, atk_damage, atk_deathtype); W_MuzzleFlash(WEP_BLASTER, actor, weaponentity, w_shotorg, w_shotdir); entity missile = new(blasterbolt); diff --git a/qcsrc/common/weapons/weapon/blaster.qh b/qcsrc/common/weapons/weapon/blaster.qh index c0865ba4f..670af8120 100644 --- a/qcsrc/common/weapons/weapon/blaster.qh +++ b/qcsrc/common/weapons/weapon/blaster.qh @@ -4,6 +4,8 @@ MODEL(BLASTER_VIEW, W_Model("h_laser.iqm")); MODEL(BLASTER_WORLD, W_Model("v_laser.md3")); MODEL(BLASTER_ITEM, W_Model("g_laser.md3")); + +SOUND(BLASTER_FIRE, W_Sound("lasergun_fire")); #endif CLASS(Blaster, Weapon) diff --git a/qcsrc/common/weapons/weapon/crylink.qh b/qcsrc/common/weapons/weapon/crylink.qh index aaa76a526..cebd7ad5b 100644 --- a/qcsrc/common/weapons/weapon/crylink.qh +++ b/qcsrc/common/weapons/weapon/crylink.qh @@ -4,6 +4,12 @@ MODEL(CRYLINK_VIEW, W_Model("h_crylink.iqm")); MODEL(CRYLINK_WORLD, W_Model("v_crylink.md3")); MODEL(CRYLINK_ITEM, W_Model("g_crylink.md3")); + +SOUND(CRYLINK_FIRE2, W_Sound("crylink_fire2")); +SOUND(CRYLINK_FIRE, W_Sound("crylink_fire")); +SOUND(CRYLINK_IMPACT2, W_Sound("crylink_impact2")); +SOUND(CRYLINK_IMPACT, W_Sound("crylink_impact")); +SOUND(CRYLINK_LINKJOIN, W_Sound("crylink_linkjoin")); #endif CLASS(Crylink, Weapon) diff --git a/qcsrc/common/weapons/weapon/devastator.qc b/qcsrc/common/weapons/weapon/devastator.qc index d85cd4634..d2c95fde5 100644 --- a/qcsrc/common/weapons/weapon/devastator.qc +++ b/qcsrc/common/weapons/weapon/devastator.qc @@ -269,7 +269,7 @@ void W_Devastator_Think(entity this) { Send_Effect(EFFECT_ROCKET_GUIDE, this.origin, this.velocity, 1); // TODO add a better sound here - sound(this.realowner, CH_WEAPON_B, SND_ROCKET_MODE, VOL_BASE, ATTN_NORM); + sound(this.realowner, CH_WEAPON_B, SND_DEVASTATOR_MODE, VOL_BASE, ATTN_NORM); this.count = 1; } } @@ -313,7 +313,7 @@ void W_Devastator_Attack(Weapon thiswep, entity actor, .entity weaponentity, int { W_DecreaseAmmo(thiswep, actor, WEP_CVAR(WEP_DEVASTATOR, ammo), weaponentity); - W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 5, SND_ROCKET_FIRE, CH_WEAPON_A, WEP_CVAR(WEP_DEVASTATOR, damage), thiswep.m_id); + W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 5, SND_DEVASTATOR_FIRE, CH_WEAPON_A, WEP_CVAR(WEP_DEVASTATOR, damage), thiswep.m_id); W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir); entity missile = WarpZone_RefSys_SpawnSameRefSys(actor); @@ -514,7 +514,7 @@ METHOD(Devastator, wr_think, void(entity thiswep, entity actor, .entity weaponen } }); if(rockfound) - sound(actor, CH_WEAPON_B, SND_ROCKET_DET, VOL_BASE, ATTN_NORM); + sound(actor, CH_WEAPON_B, SND_DEVASTATOR_DET, VOL_BASE, ATTN_NORM); } } } diff --git a/qcsrc/common/weapons/weapon/devastator.qh b/qcsrc/common/weapons/weapon/devastator.qh index 86abbb2bc..5f7d730b2 100644 --- a/qcsrc/common/weapons/weapon/devastator.qh +++ b/qcsrc/common/weapons/weapon/devastator.qh @@ -5,6 +5,11 @@ MODEL(DEVASTATOR_MUZZLEFLASH, "models/flash.md3"); MODEL(DEVASTATOR_VIEW, W_Model("h_rl.iqm")); MODEL(DEVASTATOR_WORLD, W_Model("v_rl.md3")); MODEL(DEVASTATOR_ITEM, W_Model("g_rl.md3")); + +SOUND(DEVASTATOR_DET, W_Sound("rocket_det")); +SOUND(DEVASTATOR_FIRE, W_Sound("rocket_fire")); +SOUND(DEVASTATOR_FLY, W_Sound("rocket_fly")); +SOUND(DEVASTATOR_MODE, W_Sound("rocket_mode")); #endif CLASS(Devastator, Weapon) diff --git a/qcsrc/common/weapons/weapon/electro.qh b/qcsrc/common/weapons/weapon/electro.qh index b1f2ef251..3243cd973 100644 --- a/qcsrc/common/weapons/weapon/electro.qh +++ b/qcsrc/common/weapons/weapon/electro.qh @@ -4,6 +4,13 @@ MODEL(ELECTRO_VIEW, W_Model("h_electro.iqm")); MODEL(ELECTRO_WORLD, W_Model("v_electro.md3")); MODEL(ELECTRO_ITEM, W_Model("g_electro.md3")); + +SOUND(ELECTRO_BOUNCE, W_Sound("electro_bounce")); +SOUND(ELECTRO_FIRE2, W_Sound("electro_fire2")); +SOUND(ELECTRO_FIRE, W_Sound("electro_fire")); +SOUND(ELECTRO_FLY, W_Sound("electro_fly")); +SOUND(ELECTRO_IMPACT, W_Sound("electro_impact")); +SOUND(ELECTRO_IMPACT_COMBO, W_Sound("electro_impact_combo")); #endif CLASS(Electro, Weapon) diff --git a/qcsrc/common/weapons/weapon/fireball.qh b/qcsrc/common/weapons/weapon/fireball.qh index f39747584..4374c5499 100644 --- a/qcsrc/common/weapons/weapon/fireball.qh +++ b/qcsrc/common/weapons/weapon/fireball.qh @@ -5,6 +5,13 @@ MODEL(FIREBALL_SPHERE, "models/sphere/sphere.md3"); MODEL(FIREBALL_VIEW, W_Model("h_fireball.iqm")); MODEL(FIREBALL_WORLD, W_Model("v_fireball.md3")); MODEL(FIREBALL_ITEM, W_Model("g_fireball.md3")); + +SOUND(FIREBALL_FIRE2, W_Sound("fireball_fire2")); +SOUND(FIREBALL_FIRE, W_Sound("fireball_fire")); +SOUND(FIREBALL_FLY2, W_Sound("fireball_fly2")); +SOUND(FIREBALL_FLY, W_Sound("fireball_fly")); +SOUND(FIREBALL_IMPACT2, W_Sound("fireball_impact2")); +SOUND(FIREBALL_PREFIRE2, W_Sound("fireball_prefire2")); #endif CLASS(Fireball, Weapon) diff --git a/qcsrc/common/weapons/weapon/hagar.qc b/qcsrc/common/weapons/weapon/hagar.qc index 15d8203d8..ad3e4ec1b 100644 --- a/qcsrc/common/weapons/weapon/hagar.qc +++ b/qcsrc/common/weapons/weapon/hagar.qc @@ -485,14 +485,7 @@ METHOD(Hagar, wr_impacteffect, void(entity thiswep, entity actor)) vector org2 = w_org + w_backoff * 2; pointparticles(EFFECT_HAGAR_EXPLODE, org2, '0 0 0', 1); if(!w_issilent) - { - if(w_random<0.15) - sound(actor, CH_SHOTS, SND_HAGEXP1, VOL_BASE, ATTN_NORM); - else if(w_random<0.7) - sound(actor, CH_SHOTS, SND_HAGEXP2, VOL_BASE, ATTN_NORM); - else - sound(actor, CH_SHOTS, SND_HAGEXP3, VOL_BASE, ATTN_NORM); - } + sound(actor, CH_SHOTS, SND_HAGEXP_RANDOM(), VOL_BASE, ATTN_NORM); } #endif diff --git a/qcsrc/common/weapons/weapon/hagar.qh b/qcsrc/common/weapons/weapon/hagar.qh index 60b37bf35..50c604778 100644 --- a/qcsrc/common/weapons/weapon/hagar.qh +++ b/qcsrc/common/weapons/weapon/hagar.qh @@ -4,6 +4,16 @@ MODEL(HAGAR_VIEW, W_Model("h_hagar.iqm")); MODEL(HAGAR_WORLD, W_Model("v_hagar.md3")); MODEL(HAGAR_ITEM, W_Model("g_hagar.md3")); + +SOUND(HAGAR_BEEP, W_Sound("hagar_beep")); +SOUND(HAGAR_FIRE, W_Sound("hagar_fire")); +SOUND(HAGAR_LOAD, W_Sound("hagar_load")); +SOUND(HAGEXP1, W_Sound("hagexp1")); +SOUND(HAGEXP2, W_Sound("hagexp2")); +SOUND(HAGEXP3, W_Sound("hagexp3")); +Sound SND_HAGEXP_RANDOM() { + return REGISTRY_GET(Sounds, SND_HAGEXP1.m_id + rint(random() * 2)); +} #endif CLASS(Hagar, Weapon) diff --git a/qcsrc/common/weapons/weapon/hlac.qc b/qcsrc/common/weapons/weapon/hlac.qc index 81f06fc1c..cb34eb80c 100644 --- a/qcsrc/common/weapons/weapon/hlac.qc +++ b/qcsrc/common/weapons/weapon/hlac.qc @@ -34,7 +34,7 @@ void W_HLAC_Attack(Weapon thiswep, entity actor, .entity weaponentity) if(IS_DUCKED(actor)) spread = spread * WEP_CVAR_PRI(WEP_HLAC, spread_crouchmod); - W_SetupShot(actor, weaponentity, false, 3, SND_LASERGUN_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(WEP_HLAC, damage), thiswep.m_id); + W_SetupShot(actor, weaponentity, false, 3, SND_HLAC_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(WEP_HLAC, damage), thiswep.m_id); W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir); if(!autocvar_g_norecoil) { @@ -81,7 +81,7 @@ void W_HLAC_Attack2(Weapon thiswep, entity actor, .entity weaponentity) if(IS_DUCKED(actor)) spread = spread * WEP_CVAR_SEC(WEP_HLAC, spread_crouchmod); - W_SetupShot(actor, weaponentity, false, 3, SND_LASERGUN_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(WEP_HLAC, damage) * WEP_CVAR_SEC(WEP_HLAC, shots), thiswep.m_id | HITTYPE_SECONDARY); + W_SetupShot(actor, weaponentity, false, 3, SND_HLAC_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(WEP_HLAC, damage) * WEP_CVAR_SEC(WEP_HLAC, shots), thiswep.m_id | HITTYPE_SECONDARY); W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir); W_DecreaseAmmo(thiswep, actor, WEP_CVAR_SEC(WEP_HLAC, ammo), weaponentity); diff --git a/qcsrc/common/weapons/weapon/hlac.qh b/qcsrc/common/weapons/weapon/hlac.qh index aac5f43f9..2dab5b442 100644 --- a/qcsrc/common/weapons/weapon/hlac.qh +++ b/qcsrc/common/weapons/weapon/hlac.qh @@ -4,6 +4,8 @@ MODEL(HLAC_VIEW, W_Model("h_hlac.iqm")); MODEL(HLAC_WORLD, W_Model("v_hlac.md3")); MODEL(HLAC_ITEM, W_Model("g_hlac.md3")); + +SOUND(HLAC_FIRE, W_Sound("lasergun_fire")); #endif CLASS(HLAC, Weapon) diff --git a/qcsrc/common/weapons/weapon/hook.qc b/qcsrc/common/weapons/weapon/hook.qc index a5d2dc69e..b0c7a0c1c 100644 --- a/qcsrc/common/weapons/weapon/hook.qc +++ b/qcsrc/common/weapons/weapon/hook.qc @@ -269,7 +269,6 @@ float autocvar_cl_grapplehook_alpha = 1; void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg); entityclass(Hook); -classfield(Hook) .entity HookType; // ENT_CLIENT_* classfield(Hook) .vector origin; classfield(Hook) .vector velocity; classfield(Hook) .float HookSilent; @@ -292,12 +291,9 @@ void Draw_GrapplingHook_trace_callback(vector start, vector hit, vector end) classfield(Hook) .float teleport_time; void Draw_GrapplingHook(entity this) { - vector a, b, atrans; + vector a, b; string tex; vector rgb; - float t; - vector vs; - float intensity, offset; if(this.teleport_time) if(time > this.teleport_time) @@ -309,80 +305,33 @@ void Draw_GrapplingHook(entity this) InterpolateOrigin_Do(this); int s = W_GunAlign(viewmodels[this.cnt], STAT(GUNALIGN)) - 1; - - switch(this.HookType) - { - default: - case NET_ENT_CLIENT_HOOK: - vs = hook_shotorigin[s]; - break; - case NET_ENT_CLIENT_ARC_BEAM: - vs = lightning_shotorigin[s]; - break; - } + vector vs = hook_shotorigin[s]; if((this.owner.sv_entnum == player_localentnum - 1)) { - switch(this.HookType) - { - default: - case NET_ENT_CLIENT_HOOK: - if(autocvar_chase_active) - a = csqcplayer.origin + csqcplayer.view_ofs; - else - a = view_origin + view_forward * vs.x + view_right * -vs.y + view_up * vs.z; - b = this.origin; - break; - case NET_ENT_CLIENT_ARC_BEAM: - if(this.HookRange) - b = view_origin + view_forward * this.HookRange; - else - b = view_origin + view_forward * vlen(this.velocity - this.origin); // honor original length of beam! - WarpZone_TraceLine(view_origin, b, MOVE_NORMAL, NULL); - b = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos); - a = view_origin + view_forward * vs.x + view_right * -vs.y + view_up * vs.z; - break; - } + if(autocvar_chase_active) + a = csqcplayer.origin + csqcplayer.view_ofs; + else + a = view_origin + view_forward * vs.x + view_right * -vs.y + view_up * vs.z; + b = this.origin; } else { - switch(this.HookType) - { - default: - case NET_ENT_CLIENT_HOOK: - a = this.velocity; - b = this.origin; - break; - case NET_ENT_CLIENT_ARC_BEAM: - a = this.origin; - b = this.velocity; - break; - } + a = this.velocity; + b = this.origin; } - t = entcs_GetTeamColor(this.owner.sv_entnum); + int t = entcs_GetTeamColor(this.owner.sv_entnum); - switch(this.HookType) + float intensity = autocvar_cl_grapplehook_alpha; + float offset = 0; + switch(t) { - default: - case NET_ENT_CLIENT_HOOK: - intensity = autocvar_cl_grapplehook_alpha; - offset = 0; - switch(t) - { - case NUM_TEAM_1: tex = "particles/hook_red"; rgb = '1 0.3 0.3'; break; - case NUM_TEAM_2: tex = "particles/hook_blue"; rgb = '0.3 0.3 1'; break; - case NUM_TEAM_3: tex = "particles/hook_yellow"; rgb = '1 1 0.3'; break; - case NUM_TEAM_4: tex = "particles/hook_pink"; rgb = '1 0.3 1'; break; - default: tex = "particles/hook_white"; rgb = entcs_GetColor(this.sv_entnum - 1); break; - } - break; - case NET_ENT_CLIENT_ARC_BEAM: // todo - intensity = bound(0.2, 1 + Noise_Pink(this, frametime) * 1 + Noise_Burst(this, frametime, 0.03) * 0.3, 2); - offset = Noise_Brown(this, frametime) * 10; - tex = "particles/lgbeam"; - rgb = '1 1 1'; - break; + case NUM_TEAM_1: tex = "particles/hook_red"; rgb = '1 0.3 0.3'; break; + case NUM_TEAM_2: tex = "particles/hook_blue"; rgb = '0.3 0.3 1'; break; + case NUM_TEAM_3: tex = "particles/hook_yellow"; rgb = '1 1 0.3'; break; + case NUM_TEAM_4: tex = "particles/hook_pink"; rgb = '1 0.3 1'; break; + default: tex = "particles/hook_white"; rgb = entcs_GetColor(this.sv_entnum - 1); break; } MUTATOR_CALLHOOK(DrawGrapplingHook, this, tex, rgb, t); @@ -393,39 +342,20 @@ void Draw_GrapplingHook(entity this) Draw_GrapplingHook_trace_callback_rnd = offset; Draw_GrapplingHook_trace_callback_rgb = rgb; Draw_GrapplingHook_trace_callback_a = intensity; - WarpZone_TraceBox_ThroughZone(a, '0 0 0', '0 0 0', b, ((this.HookType == NET_ENT_CLIENT_HOOK) ? MOVE_NOTHING : MOVE_NORMAL), NULL, NULL, Draw_GrapplingHook_trace_callback); + WarpZone_TraceBox_ThroughZone(a, '0 0 0', '0 0 0', b, MOVE_NOTHING, NULL, NULL, Draw_GrapplingHook_trace_callback); Draw_GrapplingHook_trace_callback_tex = string_null; - atrans = WarpZone_TransformOrigin(WarpZone_trace_transform, a); + vector atrans = WarpZone_TransformOrigin(WarpZone_trace_transform, a); - switch(this.HookType) + if(vdist(trace_endpos - atrans, >, 0.5)) { - default: - case NET_ENT_CLIENT_HOOK: - if(vdist(trace_endpos - atrans, >, 0.5)) - { - setorigin(this, trace_endpos); // hook endpoint! - this.angles = vectoangles(trace_endpos - atrans); - this.drawmask = MASK_NORMAL; - } - else - { - this.drawmask = 0; - } - break; - case NET_ENT_CLIENT_ARC_BEAM: - setorigin(this, a); // beam origin! - break; + setorigin(this, trace_endpos); // hook endpoint! + this.angles = vectoangles(trace_endpos - atrans); + this.drawmask = MASK_NORMAL; } - - switch(this.HookType) + else { - default: - case NET_ENT_CLIENT_HOOK: - break; - case NET_ENT_CLIENT_ARC_BEAM: - pointparticles(EFFECT_ARC_LIGHTNING2, trace_endpos, normalize(atrans - trace_endpos), frametime * intensity); // todo: new effect - break; + this.drawmask = 0; } } @@ -443,8 +373,6 @@ void Remove_GrapplingHook(entity this) NET_HANDLE(ENT_CLIENT_HOOK, bool bIsNew) { - this.HookType = NET_ENT_CLIENT_HOOK; - int sf = ReadByte(); this.HookSilent = (sf & 0x80); @@ -461,16 +389,7 @@ NET_HANDLE(ENT_CLIENT_HOOK, bool bIsNew) if(myowner == player_localentnum) viewmodels[slot].hook = this; this.cnt = slot; - switch(this.HookType) - { - default: - case NET_ENT_CLIENT_HOOK: - this.HookRange = 0; - break; - case NET_ENT_CLIENT_ARC_BEAM: - this.HookRange = ReadCoord(); - break; - } + this.HookRange = 0; } if(sf & 2) { @@ -490,18 +409,8 @@ NET_HANDLE(ENT_CLIENT_HOOK, bool bIsNew) IL_PUSH(g_drawables, this); this.entremove = Remove_GrapplingHook; - switch(this.HookType) - { - default: - case NET_ENT_CLIENT_HOOK: - // for the model - setmodel(this, MDL_HOOK); - this.drawmask = MASK_NORMAL; - break; - case NET_ENT_CLIENT_ARC_BEAM: - sound (this, CH_SHOTS_SINGLE, SND_LGBEAM_FLY, VOL_BASE, ATTEN_NORM); - break; - } + setmodel(this, MDL_HOOK); + this.drawmask = MASK_NORMAL; } this.teleport_time = time + 10; diff --git a/qcsrc/common/weapons/weapon/hook.qh b/qcsrc/common/weapons/weapon/hook.qh index 38d004e02..eed32c6c3 100644 --- a/qcsrc/common/weapons/weapon/hook.qh +++ b/qcsrc/common/weapons/weapon/hook.qh @@ -5,6 +5,11 @@ MODEL(HOOK, "models/hook.md3"); MODEL(HOOK_VIEW, W_Model("h_hookgun.iqm")); MODEL(HOOK_WORLD, W_Model("v_hookgun.md3")); MODEL(HOOK_ITEM, W_Model("g_hookgun.md3")); + +SOUND(HOOKBOMB_FIRE, W_Sound("hookbomb_fire")); +SOUND(HOOKBOMB_IMPACT, W_Sound("hookbomb_impact")); +SOUND(HOOK_FIRE, W_Sound("hook_fire")); +SOUND(HOOK_IMPACT, W_Sound("hook_impact")); #endif CLASS(Hook, Weapon) diff --git a/qcsrc/common/weapons/weapon/machinegun.qc b/qcsrc/common/weapons/weapon/machinegun.qc index 89d3692a1..7b16b741e 100644 --- a/qcsrc/common/weapons/weapon/machinegun.qc +++ b/qcsrc/common/weapons/weapon/machinegun.qc @@ -57,7 +57,7 @@ float MachineGun_Heat(float spread_accum) void W_MachineGun_Attack(Weapon thiswep, int deathtype, entity actor, .entity weaponentity) { - W_SetupShot(actor, weaponentity, true, 0, SND_UZI_FIRE, CH_WEAPON_A, ((actor.(weaponentity).misc_bulletcounter == 1) ? WEP_CVAR(WEP_MACHINEGUN, first_damage) : WEP_CVAR(WEP_MACHINEGUN, sustained_damage)), deathtype); + W_SetupShot(actor, weaponentity, true, 0, SND_MACHINEGUN_FIRE, CH_WEAPON_A, ((actor.(weaponentity).misc_bulletcounter == 1) ? WEP_CVAR(WEP_MACHINEGUN, first_damage) : WEP_CVAR(WEP_MACHINEGUN, sustained_damage)), deathtype); if(!autocvar_g_norecoil) { @@ -152,7 +152,7 @@ void W_MachineGun_Attack_Auto(Weapon thiswep, entity actor, .entity weaponentity W_DecreaseAmmo(thiswep, actor, WEP_CVAR(WEP_MACHINEGUN, sustained_ammo), weaponentity); - W_SetupShot(actor, weaponentity, true, 0, SND_UZI_FIRE, CH_WEAPON_A, WEP_CVAR(WEP_MACHINEGUN, sustained_damage), thiswep.m_id); + W_SetupShot(actor, weaponentity, true, 0, SND_MACHINEGUN_FIRE, CH_WEAPON_A, WEP_CVAR(WEP_MACHINEGUN, sustained_damage), thiswep.m_id); if(!autocvar_g_norecoil) { actor.punchangle_x = random() - 0.5; @@ -203,7 +203,7 @@ void W_MachineGun_Attack_Auto(Weapon thiswep, entity actor, .entity weaponentity void W_MachineGun_Attack_Burst(Weapon thiswep, entity actor, .entity weaponentity, int fire) { - W_SetupShot(actor, weaponentity, true, 0, SND_UZI_FIRE, CH_WEAPON_A, WEP_CVAR(WEP_MACHINEGUN, sustained_damage), thiswep.m_id); + W_SetupShot(actor, weaponentity, true, 0, SND_MACHINEGUN_FIRE, CH_WEAPON_A, WEP_CVAR(WEP_MACHINEGUN, sustained_damage), thiswep.m_id); if(!autocvar_g_norecoil) { actor.punchangle_x = random() - 0.5; diff --git a/qcsrc/common/weapons/weapon/machinegun.qh b/qcsrc/common/weapons/weapon/machinegun.qh index 0bac582c6..b3ecb1ab4 100644 --- a/qcsrc/common/weapons/weapon/machinegun.qh +++ b/qcsrc/common/weapons/weapon/machinegun.qh @@ -5,6 +5,8 @@ MODEL(MACHINEGUN_MUZZLEFLASH, "models/uziflash.md3"); MODEL(MACHINEGUN_VIEW, W_Model("h_uzi.iqm")); MODEL(MACHINEGUN_WORLD, W_Model("v_uzi.md3")); MODEL(MACHINEGUN_ITEM, W_Model("g_uzi.md3")); + +SOUND(MACHINEGUN_FIRE, W_Sound("uzi_fire")); #endif CLASS(MachineGun, Weapon) diff --git a/qcsrc/common/weapons/weapon/minelayer.qh b/qcsrc/common/weapons/weapon/minelayer.qh index 77825cde6..3a7c4b235 100644 --- a/qcsrc/common/weapons/weapon/minelayer.qh +++ b/qcsrc/common/weapons/weapon/minelayer.qh @@ -6,6 +6,12 @@ MODEL(MINELAYER_MINE, "models/mine.md3"); MODEL(MINELAYER_VIEW, W_Model("h_minelayer.iqm")); MODEL(MINELAYER_WORLD, W_Model("v_minelayer.md3")); MODEL(MINELAYER_ITEM, W_Model("g_minelayer.md3")); + +SOUND(MINE_DET, W_Sound("mine_det")); +SOUND(MINE_EXP, W_Sound("mine_exp")); +SOUND(MINE_FIRE, W_Sound("mine_fire")); +SOUND(MINE_STICK, W_Sound("mine_stick")); +SOUND(MINE_TRIGGER, W_Sound("mine_trigger")); #endif CLASS(MineLayer, Weapon) diff --git a/qcsrc/common/weapons/weapon/mortar.qc b/qcsrc/common/weapons/weapon/mortar.qc index 180161795..8f8936883 100644 --- a/qcsrc/common/weapons/weapon/mortar.qc +++ b/qcsrc/common/weapons/weapon/mortar.qc @@ -95,7 +95,7 @@ void W_Mortar_Grenade_Touch1(entity this, entity toucher) } else if(WEP_CVAR_PRI(WEP_MORTAR, type) == 2 && (!toucher || (toucher.takedamage != DAMAGE_AIM && toucher.move_movetype == MOVETYPE_NONE))) // stick { - spamsound(this, CH_SHOTS, SND_GRENADE_STICK, VOL_BASE, ATTN_NORM); + spamsound(this, CH_SHOTS, SND_MORTAR_STICK, VOL_BASE, ATTN_NORM); // let it stick whereever it is this.movedir = this.velocity; // save to this temporary field, will be restored on explosion @@ -131,7 +131,7 @@ void W_Mortar_Grenade_Touch2(entity this, entity toucher) } else if(WEP_CVAR_SEC(WEP_MORTAR, type) == 2 && (!toucher || (toucher.takedamage != DAMAGE_AIM && toucher.move_movetype == MOVETYPE_NONE))) // stick { - spamsound(this, CH_SHOTS, SND_GRENADE_STICK, VOL_BASE, ATTN_NORM); + spamsound(this, CH_SHOTS, SND_MORTAR_STICK, VOL_BASE, ATTN_NORM); // let it stick whereever it is this.movedir = this.velocity; // save to this temporary field, will be restored on explosion @@ -151,7 +151,7 @@ void W_Mortar_Attack(Weapon thiswep, entity actor, .entity weaponentity) { W_DecreaseAmmo(thiswep, actor, WEP_CVAR_PRI(WEP_MORTAR, ammo), weaponentity); - W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 4, SND_GRENADE_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(WEP_MORTAR, damage), thiswep.m_id); + W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 4, SND_MORTAR_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(WEP_MORTAR, damage), thiswep.m_id); w_shotdir = v_forward; // no TrueAim for grenades please W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir); @@ -203,7 +203,7 @@ void W_Mortar_Attack2(Weapon thiswep, entity actor, .entity weaponentity) W_DecreaseAmmo(thiswep, actor, WEP_CVAR_SEC(WEP_MORTAR, ammo), weaponentity); - W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 4, SND_GRENADE_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(WEP_MORTAR, damage), thiswep.m_id | HITTYPE_SECONDARY); + W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 4, SND_MORTAR_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(WEP_MORTAR, damage), thiswep.m_id | HITTYPE_SECONDARY); w_shotdir = v_forward; // no TrueAim for grenades please W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir); @@ -315,7 +315,7 @@ METHOD(Mortar, wr_think, void(entity thiswep, entity actor, .entity weaponentity } }); if(nadefound) - sound(actor, CH_WEAPON_B, SND_ROCKET_DET, VOL_BASE, ATTN_NORM); + sound(actor, CH_WEAPON_B, SND_MORTAR_DET, VOL_BASE, ATTN_NORM); } else if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(WEP_MORTAR, refire))) { @@ -368,7 +368,7 @@ METHOD(Mortar, wr_impacteffect, void(entity thiswep, entity actor)) vector org2 = w_org + w_backoff * 2; pointparticles(EFFECT_GRENADE_EXPLODE, org2, '0 0 0', 1); if(!w_issilent) - sound(actor, CH_SHOTS, SND_GRENADE_IMPACT, VOL_BASE, ATTN_NORM); + sound(actor, CH_SHOTS, SND_MORTAR_IMPACT, VOL_BASE, ATTN_NORM); } #endif diff --git a/qcsrc/common/weapons/weapon/mortar.qh b/qcsrc/common/weapons/weapon/mortar.qh index ba8140ba0..28ea1c867 100644 --- a/qcsrc/common/weapons/weapon/mortar.qh +++ b/qcsrc/common/weapons/weapon/mortar.qh @@ -4,6 +4,11 @@ MODEL(MORTAR_VIEW, W_Model("h_gl.iqm")); MODEL(MORTAR_WORLD, W_Model("v_gl.md3")); MODEL(MORTAR_ITEM, W_Model("g_gl.md3")); + +SOUND(MORTAR_DET, W_Sound("rocket_det")); +SOUND(MORTAR_FIRE, W_Sound("grenade_fire")); +SOUND(MORTAR_IMPACT, W_Sound("grenade_impact")); +SOUND(MORTAR_STICK, W_Sound("grenade_stick")); #endif CLASS(Mortar, Weapon) diff --git a/qcsrc/common/weapons/weapon/porto.qh b/qcsrc/common/weapons/weapon/porto.qh index b901cedcc..b7d7b5654 100644 --- a/qcsrc/common/weapons/weapon/porto.qh +++ b/qcsrc/common/weapons/weapon/porto.qh @@ -5,6 +5,13 @@ MODEL(PORTAL, "models/portal.md3"); MODEL(PORTO_VIEW, W_Model("h_porto.iqm")); MODEL(PORTO_WORLD, W_Model("v_porto.md3")); MODEL(PORTO_ITEM, W_Model("g_porto.md3")); + +SOUND(PORTO_BOUNCE, "porto/bounce"); +SOUND(PORTO_CREATE, "porto/create"); +SOUND(PORTO_EXPIRE, "porto/expire"); +SOUND(PORTO_EXPLODE, "porto/explode"); +SOUND(PORTO_FIRE, "porto/fire"); +SOUND(PORTO_UNSUPPORTED, "porto/unsupported"); #endif CLASS(PortoLaunch, Weapon) diff --git a/qcsrc/common/weapons/weapon/rifle.qc b/qcsrc/common/weapons/weapon/rifle.qc index 7a1fb2cfa..29794f415 100644 --- a/qcsrc/common/weapons/weapon/rifle.qc +++ b/qcsrc/common/weapons/weapon/rifle.qc @@ -44,12 +44,12 @@ void W_Rifle_FireBullet(Weapon thiswep, .entity weaponentity, int deathtype, Sou void W_Rifle_Attack(Weapon thiswep, entity actor, .entity weaponentity) { - W_Rifle_FireBullet(thiswep, weaponentity, thiswep.m_id, SND_CAMPINGRIFLE_FIRE, actor, true); + W_Rifle_FireBullet(thiswep, weaponentity, thiswep.m_id, SND_RIFLE_FIRE, actor, true); } void W_Rifle_Attack2(Weapon thiswep, entity actor, .entity weaponentity) { - W_Rifle_FireBullet(thiswep, weaponentity, thiswep.m_id | HITTYPE_SECONDARY, SND_CAMPINGRIFLE_FIRE2, actor, false); + W_Rifle_FireBullet(thiswep, weaponentity, thiswep.m_id | HITTYPE_SECONDARY, SND_RIFLE_FIRE2, actor, false); } .void(Weapon thiswep, entity actor, .entity weaponentity) rifle_bullethail_attackfunc; diff --git a/qcsrc/common/weapons/weapon/rifle.qh b/qcsrc/common/weapons/weapon/rifle.qh index e3dfbb6a2..96219c86b 100644 --- a/qcsrc/common/weapons/weapon/rifle.qh +++ b/qcsrc/common/weapons/weapon/rifle.qh @@ -4,6 +4,9 @@ MODEL(RIFLE_VIEW, W_Model("h_campingrifle.iqm")); MODEL(RIFLE_WORLD, W_Model("v_campingrifle.md3")); MODEL(RIFLE_ITEM, W_Model("g_campingrifle.md3")); + +SOUND(RIFLE_FIRE2, W_Sound("campingrifle_fire2")); +SOUND(RIFLE_FIRE, W_Sound("campingrifle_fire")); #endif CLASS(Rifle, Weapon) diff --git a/qcsrc/common/weapons/weapon/seeker.qc b/qcsrc/common/weapons/weapon/seeker.qc index 0f439716b..290431057 100644 --- a/qcsrc/common/weapons/weapon/seeker.qc +++ b/qcsrc/common/weapons/weapon/seeker.qc @@ -266,7 +266,7 @@ void W_Seeker_Fire_Flac(Weapon thiswep, entity actor, .entity weaponentity) f_diff = '+1.25 +3.75 0'; break; } - W_SetupShot_ProjectileSize(actor, weaponentity, '-2 -2 -2', '2 2 2', false, 2, SND_FLAC_FIRE, CH_WEAPON_A, WEP_CVAR(WEP_SEEKER, flac_damage), thiswep.m_id | HITTYPE_SECONDARY); + W_SetupShot_ProjectileSize(actor, weaponentity, '-2 -2 -2', '2 2 2', false, 2, SND_SEEKER_FLAC_FIRE, CH_WEAPON_A, WEP_CVAR(WEP_SEEKER, flac_damage), thiswep.m_id | HITTYPE_SECONDARY); w_shotorg += f_diff; // uses hagar effects! @@ -653,28 +653,14 @@ METHOD(Seeker, wr_impacteffect, void(entity thiswep, entity actor)) { pointparticles(EFFECT_HAGAR_EXPLODE, org2, '0 0 0', 1); if(!w_issilent) - { - if(w_random<0.15) - sound(actor, CH_SHOTS, SND_TAGEXP1, 1, ATTEN_NORM); - else if(w_random<0.7) - sound(actor, CH_SHOTS, SND_TAGEXP2, 1, ATTEN_NORM); - else - sound(actor, CH_SHOTS, SND_TAGEXP3, 1, ATTEN_NORM); - } + sound(actor, CH_SHOTS, SND_TAGEXP_RANDOM(), 1, ATTEN_NORM); } } else { pointparticles(EFFECT_HAGAR_EXPLODE, org2, '0 0 0', 1); if(!w_issilent) - { - if(w_random<0.15) - sound(actor, CH_SHOTS, SND_SEEKEREXP1, 1, ATTEN_NORM); - else if(w_random<0.7) - sound(actor, CH_SHOTS, SND_SEEKEREXP2, 1, ATTEN_NORM); - else - sound(actor, CH_SHOTS, SND_SEEKEREXP3, 1, ATTEN_NORM); - } + sound(actor, CH_SHOTS, SND_SEEKEREXP_RANDOM(), 1, ATTEN_NORM); } } diff --git a/qcsrc/common/weapons/weapon/seeker.qh b/qcsrc/common/weapons/weapon/seeker.qh index e3bda73cd..64bd07eb2 100644 --- a/qcsrc/common/weapons/weapon/seeker.qh +++ b/qcsrc/common/weapons/weapon/seeker.qh @@ -4,6 +4,24 @@ MODEL(SEEKER_VIEW, W_Model("h_seeker.iqm")); MODEL(SEEKER_WORLD, W_Model("v_seeker.md3")); MODEL(SEEKER_ITEM, W_Model("g_seeker.md3")); + +SOUND(SEEKER_FLAC_FIRE, W_Sound("flac_fire")); +SOUND(TAGEXP1, W_Sound("tagexp1")); +SOUND(TAGEXP2, W_Sound("tagexp2")); +SOUND(TAGEXP3, W_Sound("tagexp3")); +Sound SND_TAGEXP_RANDOM() { + return REGISTRY_GET(Sounds, SND_TAGEXP1.m_id + rint(random() * 2)); +} +SOUND(TAG_FIRE, W_Sound("tag_fire")); +SOUND(TAG_IMPACT, W_Sound("tag_impact")); +SOUND(SEEKEREXP1, W_Sound("seekerexp1")); +SOUND(SEEKEREXP2, W_Sound("seekerexp2")); +SOUND(SEEKEREXP3, W_Sound("seekerexp3")); +Sound SND_SEEKEREXP_RANDOM() { + return REGISTRY_GET(Sounds, SND_SEEKEREXP1.m_id + rint(random() * 2)); +} +SOUND(SEEKER_FIRE, W_Sound("seeker_fire")); +SOUND(SEEKER_ROCKET_FLY, W_Sound("tag_rocket_fly")); #endif CLASS(Seeker, Weapon) diff --git a/qcsrc/common/weapons/weapon/shockwave.qc b/qcsrc/common/weapons/weapon/shockwave.qc index 605dbd7da..6e67d525e 100644 --- a/qcsrc/common/weapons/weapon/shockwave.qc +++ b/qcsrc/common/weapons/weapon/shockwave.qc @@ -142,7 +142,7 @@ void W_Shockwave_Melee_Think(entity this) void W_Shockwave_Melee(Weapon thiswep, entity actor, .entity weaponentity, int fire) { - sound(actor, CH_WEAPON_A, SND_SHOTGUN_MELEE, VOL_BASE, ATTN_NORM); + sound(actor, CH_WEAPON_A, SND_SHOCKWAVE_MELEE, VOL_BASE, ATTN_NORM); weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR(WEP_SHOCKWAVE, melee_animtime), w_ready); entity meleetemp = new_pure(meleetemp); @@ -269,7 +269,7 @@ void W_Shockwave_Attack(Weapon thiswep, entity actor, .entity weaponentity) float i, queue = 0; // set up the shot direction - W_SetupShot(actor, weaponentity, true, 3, SND_LASERGUN_FIRE, CH_WEAPON_B, WEP_CVAR(WEP_SHOCKWAVE, blast_damage), thiswep.m_id); + W_SetupShot(actor, weaponentity, true, 3, SND_SHOCKWAVE_FIRE, CH_WEAPON_B, WEP_CVAR(WEP_SHOCKWAVE, blast_damage), thiswep.m_id); vector attack_endpos = (w_shotorg + (w_shotdir * WEP_CVAR(WEP_SHOCKWAVE, blast_distance))); WarpZone_TraceLine(w_shotorg, attack_endpos, MOVE_NOMONSTERS, actor); vector attack_hitpos = trace_endpos; diff --git a/qcsrc/common/weapons/weapon/shockwave.qh b/qcsrc/common/weapons/weapon/shockwave.qh index 69599aae4..4792d8890 100644 --- a/qcsrc/common/weapons/weapon/shockwave.qh +++ b/qcsrc/common/weapons/weapon/shockwave.qh @@ -5,6 +5,9 @@ MODEL(SHOCKWAVE_MUZZLEFLASH, "models/uziflash.md3"); MODEL(SHOCKWAVE_VIEW, W_Model("h_shotgun.iqm")); MODEL(SHOCKWAVE_WORLD, W_Model("v_shotgun.md3")); MODEL(SHOCKWAVE_ITEM, W_Model("g_shotgun.md3")); + +SOUND(SHOCKWAVE_FIRE, W_Sound("lasergun_fire")); +SOUND(SHOCKWAVE_MELEE, W_Sound("shotgun_melee")); #endif CLASS(Shockwave, Weapon) diff --git a/qcsrc/common/weapons/weapon/shotgun.qh b/qcsrc/common/weapons/weapon/shotgun.qh index 085ea2d88..3da11e6cd 100644 --- a/qcsrc/common/weapons/weapon/shotgun.qh +++ b/qcsrc/common/weapons/weapon/shotgun.qh @@ -5,6 +5,9 @@ MODEL(SHOTGUN_MUZZLEFLASH, "models/uziflash.md3"); MODEL(SHOTGUN_VIEW, W_Model("h_shotgun.iqm")); MODEL(SHOTGUN_WORLD, W_Model("v_shotgun.md3")); MODEL(SHOTGUN_ITEM, W_Model("g_shotgun.md3")); + +SOUND(SHOTGUN_FIRE, W_Sound("shotgun_fire")); +SOUND(SHOTGUN_MELEE, W_Sound("shotgun_melee")); #endif CLASS(Shotgun, Weapon) diff --git a/qcsrc/common/weapons/weapon/vaporizer.qc b/qcsrc/common/weapons/weapon/vaporizer.qc index 4cd9415cf..317b432ab 100644 --- a/qcsrc/common/weapons/weapon/vaporizer.qc +++ b/qcsrc/common/weapons/weapon/vaporizer.qc @@ -123,7 +123,7 @@ void W_Vaporizer_Attack(Weapon thiswep, entity actor, .entity weaponentity) W_SetupShot(actor, weaponentity, true, 0, SND_Null, CH_WEAPON_A, vaporizer_damage, thiswep.m_id); // handle sound separately so we can change the volume // added bonus: no longer plays the strength sound (strength gives no bonus to instakill anyway) - sound (actor, CH_WEAPON_A, SND_MINSTANEXFIRE, VOL_BASE * 0.8, ATTEN_NORM); + sound (actor, CH_WEAPON_A, SND_VAPORIZER_FIRE, VOL_BASE * 0.8, ATTEN_NORM); yoda = 0; impressive_hits = 0; @@ -196,7 +196,7 @@ void W_RocketMinsta_Attack(entity actor, .entity weaponentity, int mode) entity proj; int laser_count = max(1, autocvar_g_rm_laser_count); int total = (mode == 0) ? laser_count : 1; - Sound snd = (mode == 0) ? SND_CRYLINK_FIRE : SND_ELECTRO_FIRE2; + Sound snd = (mode == 0) ? SND_CRYLINK_FIRE : SND_ELECTRO_FIRE2; // WEAPONTODO multiple references to other weapons here! W_SetupShot_ProjectileSize(actor, weaponentity, '0 0 -3', '0 0 -3', false, 2, snd, CH_WEAPON_A, autocvar_g_rm_laser_damage, WEP_ELECTRO.m_id); // uses electro effects @@ -382,7 +382,7 @@ METHOD(Vaporizer, wr_impacteffect, void(entity thiswep, entity actor)) vector org2 = w_org + w_backoff * 2; pointparticles(EFFECT_VORTEX_IMPACT, org2, '0 0 0', 1); if(!w_issilent) - sound(actor, CH_SHOTS, SND_NEXIMPACT, VOL_BASE, ATTN_NORM); + sound(actor, CH_SHOTS, SND_VAPORIZER_IMPACT, VOL_BASE, ATTN_NORM); } METHOD(Vaporizer, wr_init, void(entity thiswep)) diff --git a/qcsrc/common/weapons/weapon/vaporizer.qh b/qcsrc/common/weapons/weapon/vaporizer.qh index f43d039bb..c4a567424 100644 --- a/qcsrc/common/weapons/weapon/vaporizer.qh +++ b/qcsrc/common/weapons/weapon/vaporizer.qh @@ -5,6 +5,9 @@ MODEL(VAPORIZER_MUZZLEFLASH, "models/nexflash.md3"); MODEL(VAPORIZER_VIEW, W_Model("h_minstanex.iqm")); MODEL(VAPORIZER_WORLD, W_Model("v_minstanex.md3")); MODEL(VAPORIZER_ITEM, W_Model("g_minstanex.md3")); + +SOUND(VAPORIZER_FIRE, W_Sound("minstanexfire")); +SOUND(VAPORIZER_IMPACT, W_Sound("neximpact")); #endif CLASS(Vaporizer, Weapon) diff --git a/qcsrc/common/weapons/weapon/vortex.qc b/qcsrc/common/weapons/weapon/vortex.qc index 445494b4c..f3a8794c3 100644 --- a/qcsrc/common/weapons/weapon/vortex.qc +++ b/qcsrc/common/weapons/weapon/vortex.qc @@ -121,10 +121,10 @@ void W_Vortex_Attack(Weapon thiswep, entity actor, .entity weaponentity, float i mydmg *= charge; myforce *= charge; - W_SetupShot(actor, weaponentity, true, 5, SND_NEXFIRE, CH_WEAPON_A, mydmg, dtype); + W_SetupShot(actor, weaponentity, true, 5, SND_VORTEX_FIRE, CH_WEAPON_A, mydmg, dtype); if(charge > WEP_CVAR(WEP_VORTEX, charge_animlimit) && WEP_CVAR(WEP_VORTEX, charge_animlimit)) // if the Vortex is overcharged, we play an extra sound { - sound(actor, CH_WEAPON_B, SND_NEXCHARGE, VOL_BASE * (charge - 0.5 * WEP_CVAR(WEP_VORTEX, charge_animlimit)) / (1 - 0.5 * WEP_CVAR(WEP_VORTEX, charge_animlimit)), ATTN_NORM); + sound(actor, CH_WEAPON_B, SND_VORTEX_CHARGE, VOL_BASE * (charge - 0.5 * WEP_CVAR(WEP_VORTEX, charge_animlimit)) / (1 - 0.5 * WEP_CVAR(WEP_VORTEX, charge_animlimit)), ATTN_NORM); } yoda = 0; @@ -326,7 +326,7 @@ METHOD(Vortex, wr_impacteffect, void(entity thiswep, entity actor)) vector org2 = w_org + w_backoff * 2; pointparticles(EFFECT_VORTEX_IMPACT, org2, '0 0 0', 1); if(!w_issilent) - sound(this, CH_SHOTS, SND_NEXIMPACT, VOL_BASE, ATTN_NORM); + sound(this, CH_SHOTS, SND_VORTEX_IMPACT, VOL_BASE, ATTN_NORM); } METHOD(Vortex, wr_init, void(entity thiswep)) { diff --git a/qcsrc/common/weapons/weapon/vortex.qh b/qcsrc/common/weapons/weapon/vortex.qh index e25244f1e..68c70f4fa 100644 --- a/qcsrc/common/weapons/weapon/vortex.qh +++ b/qcsrc/common/weapons/weapon/vortex.qh @@ -5,6 +5,10 @@ MODEL(VORTEX_MUZZLEFLASH, "models/nexflash.md3"); MODEL(VORTEX_VIEW, W_Model("h_nex.iqm")); MODEL(VORTEX_WORLD, W_Model("v_nex.md3")); MODEL(VORTEX_ITEM, W_Model("g_nex.md3")); + +SOUND(VORTEX_CHARGE, W_Sound("nexcharge")); +SOUND(VORTEX_FIRE, W_Sound("nexfire")); +SOUND(VORTEX_IMPACT, W_Sound("neximpact")); #endif CLASS(Vortex, Weapon) -- 2.39.2