messsages. Such messages are not not flushed immediately upon the monster coming into view, but:
After world_reacts() is done.
When mpr() is called and the player is either delayed or repeating a command.
This should make sure that the "comes into view" message comes before any other messages the monster might give, and also fix the problem of the player moving into a monster's LOS, getting a "comes into view" message, and the monster then moving back out of LOS during the immediately following world_reacts(), which would leave the player puzzled as to why there's no monster in view.
As part of the change you.turn_is_over is set to true as soon as world_reacts() starts, which might cause bugs in other places, yet some play testing indicates that it's okay.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8621 c06c8d41-db1a-0410-9941-cceddc491573
5FHHUWTO4RQF244PHWV237WRNIXCZX5Q2KRX7VKDDUQWEXAL24NAC
UYWCKXZ4FYTWLE73ACGXN632B2VT3OWDYGB5NR3EIF2DIQ7XIKWAC
I7IISLBH7RZG7JOV635XM4LQ6TP4LDP532QEMHSTF4AHUPRZHEBAC
KYGHHL2UOXX7VM2PLMHMR2566MNQRZ7LOS7OSA4NSTGGUFRFVGXQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
DGPZZUWTMWADFTFLZ37DHWXXDXMBZHROCFTYL472HI6ETGEK6CBAC
UWMN4HLG6YA2YFQEVIVMDISD6APKEPIZXMMPMNUYCBQDSAUYSXPQC
ANOEQTM6IGCBTESKKQ5PCBSDTZ7VGRCMDIOAFEH4R7DJHKWKDFAAC
HM6NOS7BN5665KWIFGBXOHZIDMRSVCESN72GMGI6NVBFZGCF3L6QC
YPD42V7VOQFGAVLLOSQAQ4SD77L5L3LZHPLFVZIAOHBNDKPO3O4QC
UQFNR6PCRYPSUWMFF7KHITOVE4DZJ4CEAHFSXO7NG6GYZRF5JKUAC
64RZSOR4B4T5QO3FAERBTH2QJIQFSCIFHI4WYK3MDAEAZVAHRLVQC
WT66JDIRTLLP37SHTV4GI3V64JFJ4D25LNRLGCHFG6CLEFKJ3QGQC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
57E4T664CXRFPVW2BZBYI33UIHFS4PSEZURZYPSYSZK5DRLJJ5CQC
JM7UAK777RAVDAVLQLEOBRTGNW2B47S5G55XITJXO243IUNZHVYQC
O6ZMFKDI3XO2SWPNEYHIPYFDWJR4TVDP5BAATK6LVCVETQID6E7AC
RYT42Z6CED4KV5CCJ45CHZ3DQGLFMDCVH6CSQZNXOILULDG4MXVQC
IYMUEJG2VI3TV7HVAZIU2L4DVQY7VNSIFVV4I3QIVP7H66EVJISAC
if ((mons_class_flag(monster->type, M_SPEAKS)
|| !monster->mname.empty())
&& (!mons_is_wandering(monster) || monster->attitude == ATT_NEUTRAL)
&& one_chance_in(MON_SPEAK_CHANCE))
if (monster->is_patrolling() || mons_is_wandering(monster)
|| monster->attitude == ATT_NEUTRAL)
{
// Very fast wandering/patrolling monsters might, in one monster turn,
// move into the player's LOS and then back out (or the player
// might move into their LOS and the monster move back out before
// the player's view has a chance to update) so prevent them
// from speaking.
;
}
else if ((mons_class_flag(monster->type, M_SPEAKS)
|| !monster->mname.empty())
&& one_chance_in(MON_SPEAK_CHANCE))
}
// Flush out any "comes into view" monster announcements before the
// monster has a chance to give any other messages.
if (!_updating_view && you.turn_is_over
&& (you_are_delayed() || crawl_state.is_repeating_cmd()))
{
_updating_view = true;
update_monsters_in_view();
_updating_view = false;