diff options
Diffstat (limited to 'crawl-ref/source/ghost.cc')
-rw-r--r-- | crawl-ref/source/ghost.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/ghost.cc b/crawl-ref/source/ghost.cc index 5216cc4352..d09f1484ac 100644 --- a/crawl-ref/source/ghost.cc +++ b/crawl-ref/source/ghost.cc @@ -453,6 +453,7 @@ std::vector<ghost_demon> ghost_demon::find_ghosts() ghost_demon player; player.init_player_ghost(); + announce_ghost(player); gs.push_back(player); find_extra_ghosts( gs, n_extra_ghosts() ); @@ -477,6 +478,7 @@ void ghost_demon::find_transiting_ghosts( const monsters &m = i->mons; if (m.ghost.get()) { + announce_ghost(*m.ghost); gs.push_back(*m.ghost); --n; } @@ -485,6 +487,13 @@ void ghost_demon::find_transiting_ghosts( } } +void ghost_demon::announce_ghost(const ghost_demon &g) +{ +#ifdef DEBUG_DIAGNOSTICS + mprf(MSGCH_DIAGNOSTICS, "Saving ghost: %s", g.name.c_str()); +#endif +} + void ghost_demon::find_extra_ghosts( std::vector<ghost_demon> &gs, int n ) { for (int i = 0; n > 0 && i < MAX_MONSTERS; ++i) @@ -495,6 +504,7 @@ void ghost_demon::find_extra_ghosts( std::vector<ghost_demon> &gs, int n ) if (menv[i].type == MONS_PLAYER_GHOST && menv[i].ghost.get()) { // Bingo! + announce_ghost(*menv[i].ghost); gs.push_back( *menv[i].ghost ); --n; } |