Skip to content

Commit

Permalink
Check missile source type to determine death reason
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenCWills committed Oct 19, 2024
1 parent fade1d0 commit 57b86df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/missiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ void CheckMissileCol(Missile &missile, DamageType damageType, int minDamage, int
isPlayerHit = PlayerMHit(*player, &monster, missile._midist, minDamage, maxDamage, missile._mitype, damageType, isDamageShifted, DeathReason::MonsterOrTrap, &blocked);
}
} else {
DeathReason deathReason = (!missile.IsTrap() && (missile._miAnimType == MissileGraphicID::FireWall || missile._miAnimType == MissileGraphicID::Lightning)) ? DeathReason::Player : DeathReason::MonsterOrTrap;
DeathReason deathReason = missile.sourceType() == MissileSource::Player ? DeathReason::Player : DeathReason::MonsterOrTrap;
isPlayerHit = PlayerMHit(*player, nullptr, missile._midist, minDamage, maxDamage, missile._mitype, damageType, isDamageShifted, deathReason, &blocked);
}
}
Expand Down

0 comments on commit 57b86df

Please sign in to comment.