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 51f5082 commit e0b8ec7
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 @@ -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);
}
}
Expand Down

0 comments on commit e0b8ec7

Please sign in to comment.