summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc17
1 files changed, 14 insertions, 3 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index ff41163450..539bfe8198 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -842,9 +842,17 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
}
}
+ const coord_def mwhere = monster->pos();
if (!hard_reset)
monster_drop_ething(monster, YOU_KILL(killer) || pet_kill);
monster_cleanup(monster);
+
+ // Force redraw for monsters that die.
+ if (see_grid(mwhere))
+ {
+ view_update_at(mwhere);
+ update_screen();
+ }
} // end monster_die
void monster_cleanup(monsters *monster)
@@ -3556,7 +3564,7 @@ static void handle_monster_move(int i, monsters *monster)
monster->check_speed();
- while (monster->speed_increment >= 80)
+ while (monster->has_action_energy())
{ // The continues & breaks are WRT this.
if (!monster->alive())
break;
@@ -3580,7 +3588,7 @@ static void handle_monster_move(int i, monsters *monster)
}
}
- if (monster->type == MONS_TIAMAT && one_chance_in(3) )
+ if (monster->type == MONS_TIAMAT && one_chance_in(3))
{
int cols[] = { RED, WHITE, DARKGREY, GREEN, MAGENTA };
int newcol = cols[random2(sizeof(cols) / sizeof(cols[0]))];
@@ -4122,6 +4130,8 @@ static bool monster_swaps_places( monsters *mon, int mx, int my )
mgrd[cx][cy] = m2i;
immobile_monster[m2i] = true;
+ mon->check_redraw(coord_def(cx, cy));
+
mons_trap(mon);
mons_trap(m2);
@@ -4175,6 +4185,8 @@ static void do_move_monster(monsters *monster, int xi, int yi)
items (eg ammunition) identical to those it's carrying. */
mgrd[monster->x][monster->y] = monster_index(monster);
+ monster->check_redraw(monster->pos() - coord_def(xi, yi));
+
// monsters stepping on traps:
mons_trap(monster);
@@ -4576,7 +4588,6 @@ static void monster_move(monsters *monster)
}
}
-
// now, if a monster can't move in its intended direction, try
// either side. If they're both good, move in whichever dir
// gets it closer(farther for fleeing monsters) to its target.