diff options
-rw-r--r-- | crawl-ref/source/monplace.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index 0144a77bcf..0f037be8f6 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -645,10 +645,11 @@ bool place_monster(int &id, int mon_type, int power, beh_type behaviour, // (5) for each band monster, loop call to place_monster_aux(). for(i = 1; i < band_size; i++) { - id = place_monster_aux( band_monsters[i], behaviour, target, px, py, - lev_mons, extra, false, dur); - if (id != -1 && id != NON_MONSTER) - menv[id].flags |= MF_BAND_MEMBER; + const int band_id = + place_monster_aux( band_monsters[i], behaviour, target, px, py, + lev_mons, extra, false, dur); + if (band_id != -1 && band_id != NON_MONSTER) + menv[band_id].flags |= MF_BAND_MEMBER; } // placement of first monster, at least, was a success. |