pull request #1175 - obj->corpsenm fixes
Pull request by mkuoppal: some objects which use the corpsenm field to access the mons[] array can have a corpsenm value of NON_PM (-1) and weren't avoiding array access in those cases. In addition to a fixes entry for it, this makes some revisions to the commited code, handling a few of the cases differently. Closes #1175
This commit is contained in:
@@ -199,6 +199,8 @@
|
||||
|
||||
#define touch_petrifies(ptr) \
|
||||
((ptr) == &mons[PM_COCKATRICE] || (ptr) == &mons[PM_CHICKATRICE])
|
||||
/* Medusa doesn't pass touch_petrifies() but does petrify if eaten */
|
||||
#define flesh_petrifies(pm) (touch_petrifies(pm) || (pm) == &mons[PM_MEDUSA])
|
||||
|
||||
/* missiles made of rocks don't harm these: xorns and earth elementals
|
||||
(but not ghosts and shades because that would impact all missile use
|
||||
|
||||
Reference in New Issue
Block a user