int tempdb;
int ClientProgsDB;
vector hook_shotorigin[4]; // WEAPONTODO
-vector lightning_shotorigin[4]; // TODO: unused
float serverprevtime, serverdeltatime;
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;
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;
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;
}
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")
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;
}
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:
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;
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
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);
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");
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;
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))
{
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;
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);
}
}
-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);
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;
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';
}
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;
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)
{
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)
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;
#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);
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;
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))
#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);
/* 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);
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);
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)
#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);
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;
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();
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"));
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"));
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"));
//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");
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");
#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)
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);
#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)
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);
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)
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;
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);
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);
#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);
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);
.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);
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;
#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)
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);
}
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;
#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)
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);
}
#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);
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);
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);
#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;
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;
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);
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);
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);
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);
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);
{
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); }
}
}
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)
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);
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)
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)
{
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;
}
}
{
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);
}
});
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);
}
}
}
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)
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)
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)
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
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)
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)
{
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);
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)
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;
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)
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);
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;
}
}
NET_HANDLE(ENT_CLIENT_HOOK, bool bIsNew)
{
- this.HookType = NET_ENT_CLIENT_HOOK;
-
int sf = ReadByte();
this.HookSilent = (sf & 0x80);
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)
{
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;
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)
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)
{
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;
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;
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)
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)
}
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
}
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
{
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);
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);
}
});
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)))
{
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
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)
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)
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;
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)
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!
{
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);
}
}
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)
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);
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;
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)
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)
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;
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
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))
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)
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;
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))
{
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)