if(sound_allowed(MSG_BROADCAST, attacker))
if(!DEATH_ISWEAPON(deathtype, WEP_LASER) || attacker != self || self.health < 2 * cvar("g_balance_laser_primary_damage") * cvar("g_balance_selfdamagepercent") + 1)
+ if(self.health > 1)
// exclude pain sounds for laserjumps as long as you aren't REALLY low on health and would die of the next two
{
- if(self.health > 75) // TODO make a "gentle" version?
+ if(deathtype == DEATH_FALL)
+ PlayerSound(playersound_fall, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
+ else if(self.health > 75) // TODO make a "gentle" version?
PlayerSound(playersound_pain100, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
else if(self.health > 50)
PlayerSound(playersound_pain75, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
else if(self.health > 25)
PlayerSound(playersound_pain50, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
- else if(self.health > 1)
+ else
PlayerSound(playersound_pain25, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
}
}
else
dm = min((dm - cvar("g_balance_falldamage_minspeed")) * cvar("g_balance_falldamage_factor"), cvar("g_balance_falldamage_maxdamage"));
if (dm > 0)
- {
Damage (self, world, world, dm, DEATH_FALL, self.origin, '0 0 0');
- // this must be allowed to cut the normal pain sounds (played after them and on the same channel)
- // there's no way to detect falling damage and prevent the pain sounds for this to be played instead
- if(self.health > 0)
- PlayerSound(playersound_fall, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
- }
}
maxspeed = cvar("g_maxspeed");