Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: mon_hates_material and player race
mon_hates_material(mondata.c) was not evaluating the hero's race correctly due to upstream changes in 580c5a6, which removed the attempt to assess the hero's race from is_elf, is_dwarf, etc macros (for reasons described in that commit message). However, mon_hates_material was just passing gy.permonst.data to hates_material and relying on those macros to include the hero's race in the equation, so it was no longer working properly for an unpolymorphed hero after those changes. Make it explicitly check material hatred of the hero's race if not polymorphed. I had to remove the 'const' qualifier on raceptr to use it here, because keeping it would have led to a cascading requirement to add 'const' on all sorts of other functions (hates_material -> dmgtype -> dmgtype_fromattack...) -- and those really _should_ have const parameters, but I think that would have to be an upstream change to avoid risking a bunch of merge conflicts in subsequent merges.
- Loading branch information