From: Mario Date: Sun, 1 Jan 2017 12:18:08 +0000 (+1000) Subject: Hardcode the health/damage limits for pain sounds and laser jumps, so even powerful... X-Git-Tag: xonotic-v0.8.2~335 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3629af9aff92596feb7dc2aa9fec7a22b8cd0569;p=xonotic%2Fxonotic-data.pk3dir.git 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) --- diff --git a/qcsrc/common/weapons/weapon/crylink.qc b/qcsrc/common/weapons/weapon/crylink.qc index 58214bf39..1af08bc12 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 59f0c8029..f23e6021d 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 {