diff options
-rw-r--r-- | crawl-ref/source/debug.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/monstuff.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 4 |
3 files changed, 8 insertions, 9 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc index 710453c872..b82b2ad42e 100644 --- a/crawl-ref/source/debug.cc +++ b/crawl-ref/source/debug.cc @@ -4271,9 +4271,9 @@ void debug_miscast( int target_index ) actor* target; if (target_index == NON_MONSTER) - target = dynamic_cast<actor*>(&you); + target = &you; else - target = dynamic_cast<actor*>(&menv[target_index]); + target = &menv[target_index]; if (!target->alive()) { diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 07b1040006..3beb84676d 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -733,13 +733,13 @@ static void _mummy_curse(monsters* monster, killer_type killer, int index) actor* target; if (index == NON_MONSTER) - target = dynamic_cast<actor*>(&you); + target = &you; else { // Mummies committing suicide don't cause a death curse. - if (index == (int) monster_index(monster)) + if (index == static_cast<int>(monster_index(monster))) return; - target = dynamic_cast<actor*>(&menv[index]); + target = &menv[index]; } // Mummy was killed by a giant spore or ball lightning? @@ -6952,9 +6952,8 @@ static bool _monster_move(monsters *monster) if (target_grid == DNGN_DEEP_WATER) deep_water_available = true; - const monsters* mons = dynamic_cast<const monsters*>(monster); good_move[count_x][count_y] = - _mon_can_move_to_pos(mons, coord_def(count_x-1, count_y-1)); + _mon_can_move_to_pos(monster, coord_def(count_x-1, count_y-1)); } // Now we know where we _can_ move. diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 86320e69e3..8dde8f6add 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -2252,13 +2252,13 @@ void MiscastEffect::init() { kc = KC_YOU; kt = KILL_YOU_MISSILE; - act_source = dynamic_cast<actor*>(&you); + act_source = &you; source_known = true; } else if (kill_source >= 0 && kill_source < NON_MONSTER) { mon_source = &menv[kill_source]; - act_source = dynamic_cast<actor*>(mon_source); + act_source = mon_source; ASSERT(mon_source->type != -1); if (death_curse && target->atype() == ACT_MONSTER |