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 authored and AJenbo committed Nov 30, 2024
1 parent 9b03fa5 commit f20c6bf
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 f20c6bf

Please sign in to comment.