Skip to content

Commit

Permalink
Fixed|Hexen|SFX: Cough sound playback on Player vs PoisonCloud collision
Browse files Browse the repository at this point in the history
If god mode is active then the cough sound should not be played.
Seemingly the result of a refactoring oversight back in 2008.
  • Loading branch information
danij-deng committed Oct 6, 2014
1 parent 4dc4568 commit 574cb63
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions doomsday/plugins/hexen/src/p_inter.c
Expand Up @@ -2005,8 +2005,15 @@ int P_DamageMobj2(mobj_t *target, mobj_t *inflictor, mobj_t *source, int damageP
}
}

if(target->player)
{ // Player specific.
if(target->player) // Player specific.
{
if(damage < 1000 &&
((P_GetPlayerCheats(target->player) & CF_GODMODE) ||
target->player->powers[PT_INVULNERABILITY]))
{
return 0;
}

// Check if player-player damage is disabled.
if(source && source->player && source->player != target->player)
{
Expand Down Expand Up @@ -2230,12 +2237,12 @@ int P_DamageMobj2(mobj_t *target, mobj_t *inflictor, mobj_t *source, int damageP
{
target->player->update |= PSF_HEALTH;

if(damage < 1000 &&
/*if(damage < 1000 &&
((P_GetPlayerCheats(target->player) & CF_GODMODE) ||
target->player->powers[PT_INVULNERABILITY]))
{
return 0;
}
}*/

savedPercent = FIX2FLT(
PCLASS_INFO(player->class_)->autoArmorSave + player->armorPoints[ARMOR_ARMOR] +
Expand Down

0 comments on commit 574cb63

Please sign in to comment.