From: Charles O. <ca...@us...> - 2010-12-16 03:21:15
|
via dbf49df763fb45b3a3184d9cda39ebdef80ce32d (commit) from ebbd9f8da8e1d243257fab40491a737df94338a1 (commit) ----------------------------------------------------------------------- commit dbf49df763fb45b3a3184d9cda39ebdef80ce32d Author: Charles Otto <ott...@gm...> Date: Wed Dec 15 22:20:49 2010 -0500 Fix [2975], e. tentacle att. change affecting all monsters Add a blatantly missing type check when propagating an attitude change across eldritch tentacle segments. This instead of just changing the attitude of everything on the level. ----------------------------------------------------------------------- Summary of changes: crawl-ref/source/mon-stuff.cc | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc index 6b87c83..1311f32 100644 --- a/crawl-ref/source/mon-stuff.cc +++ b/crawl-ref/source/mon-stuff.cc @@ -4334,12 +4334,17 @@ void mons_att_changed(monster* mon) if (mon->type == MONS_ELDRITCH_TENTACLE_SEGMENT || mon->type == MONS_ELDRITCH_TENTACLE) { - int base_idx = mon->type == MONS_ELDRITCH_TENTACLE ? mon->mindex() : mon->number; + unsigned base_idx = mon->type == MONS_ELDRITCH_TENTACLE ? + mon->mindex() : mon->number; menv[base_idx].attitude = att; for (monster_iterator mi; mi; ++mi) { - mi->attitude = att; + if (mi->type == MONS_ELDRITCH_TENTACLE_SEGMENT + && mi->number == base_idx) + { + mi->attitude = att; + } } } } -- Dungeon Crawl Stone Soup |