From e0b8ec740a8fc0e578fef5e085f28be201ff03b9 Mon Sep 17 00:00:00 2001 From: staphen Date: Sat, 19 Oct 2024 14:13:09 -0400 Subject: [PATCH] Check missile source type to determine death reason --- Source/missiles.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/missiles.cpp b/Source/missiles.cpp index 9fc0700c479..f683d1d5198 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -446,7 +446,7 @@ void CheckMissileCol(Missile &missile, DamageType damageType, int minDamage, int isPlayerHit = PlayerMHit(pid - 1, &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(pid - 1, nullptr, missile._midist, minDamage, maxDamage, missile._mitype, damageType, isDamageShifted, deathReason, &blocked); } }