From 3629af9aff92596feb7dc2aa9fec7a22b8cd0569 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 1 Jan 2017 22:18:08 +1000 Subject: [PATCH] Hardcode the health/damage limits for pain sounds and laser jumps, so even powerful laser shots will play sounds (also fixes rocket jumping not making a sound) --- qcsrc/common/weapons/weapon/crylink.qc | 2 +- qcsrc/server/player.qc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/common/weapons/weapon/crylink.qc b/qcsrc/common/weapons/weapon/crylink.qc index 58214bf390..1af08bc12c 100644 --- a/qcsrc/common/weapons/weapon/crylink.qc +++ b/qcsrc/common/weapons/weapon/crylink.qc @@ -3,7 +3,7 @@ CLASS(Crylink, Weapon) /* ammotype */ ATTRIB(Crylink, ammo_field, .int, ammo_cells); /* impulse */ ATTRIB(Crylink, impulse, int, 6); -/* flags */ ATTRIB(Crylink, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH); +/* flags */ ATTRIB(Crylink, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH | WEP_FLAG_CANCLIMB); /* rating */ ATTRIB(Crylink, bot_pickupbasevalue, float, BOT_PICKUP_RATING_MID); /* color */ ATTRIB(Crylink, wpcolor, vector, '1 0.5 1'); /* modelname */ ATTRIB(Crylink, mdl, string, "crylink"); diff --git a/qcsrc/server/player.qc b/qcsrc/server/player.qc index 59f0c8029b..f23e6021dd 100644 --- a/qcsrc/server/player.qc +++ b/qcsrc/server/player.qc @@ -435,7 +435,7 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, } if(sound_allowed(MSG_BROADCAST, attacker)) - if((this.health < 2 * WEP_CVAR_PRI(blaster, damage) * autocvar_g_balance_selfdamagepercent + 1) || !(DEATH_WEAPONOF(deathtype).spawnflags & WEP_FLAG_CANCLIMB) || attacker != this) // WEAPONTODO: create separate limit for pain notification with laser + if(this.health < 25 || !(DEATH_WEAPONOF(deathtype).spawnflags & WEP_FLAG_CANCLIMB) || take > 20 || attacker != this) if(this.health > 1) // exclude pain sounds for laserjumps as long as you aren't REALLY low on health and would die of the next two { -- 2.39.2