diff options
author | Neil Moore <neil@s-z.org> | 2014-08-13 11:27:56 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-08-13 11:29:48 -0400 |
commit | c7bde6303a0e0650a5c1a937070c1bf318d4d595 (patch) | |
tree | 51ba6c614dcb7597f5ac4d260c6ebe7a528c8a4f | |
parent | 36858c63e3890d7b6a1476f9779aba5ca6a12fbf (diff) | |
download | crawl-ref-c7bde6303a0e0650a5c1a937070c1bf318d4d595.tar.gz crawl-ref-c7bde6303a0e0650a5c1a937070c1bf318d4d595.zip |
Avoid another beholder crash (#8844)
0.14-a0-1237-g6f3e6ea fixed update_beholders and update_fearmongers
but not update_beholder and update_fearmonger.
-rw-r--r-- | crawl-ref/source/behold.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/fearmonger.cc | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/behold.cc b/crawl-ref/source/behold.cc index f7286ebdbb..1cf935e0fc 100644 --- a/crawl-ref/source/behold.cc +++ b/crawl-ref/source/behold.cc @@ -233,6 +233,9 @@ void player::update_beholder(const monster* mon) if (beholders[i] == mon->mindex()) { beholders.erase(beholders.begin() + i); + // Do this dance to clear the duration before printing messages + // (#8844), but still print all messages in the right order. + _removed_beholder(true); _removed_beholder_msg(mon); _removed_beholder(); return; diff --git a/crawl-ref/source/fearmonger.cc b/crawl-ref/source/fearmonger.cc index af8d37ba79..1f0f84d7ce 100644 --- a/crawl-ref/source/fearmonger.cc +++ b/crawl-ref/source/fearmonger.cc @@ -160,6 +160,9 @@ void player::update_fearmonger(const monster* mon) if (fearmongers[i] == mon->mindex()) { fearmongers.erase(fearmongers.begin() + i); + // Do this dance to clear the duration before printing messages + // (#8844), but still print all messages in the right order. + _removed_fearmonger(true); _removed_fearmonger_msg(mon); _removed_fearmonger(); return; |