diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-10-26 16:02:11 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-10-27 01:53:01 +0200 |
commit | b95792fc170e37c89afa91322c1e0f4f2d291392 (patch) | |
tree | 028677eabc3fe5fb502e2b2a7deb8362abb41a95 /crawl-ref/source/random.h | |
parent | 1b0b748f7c32abe7bb3e5d60667eef29f9426dde (diff) | |
download | crawl-ref-b95792fc170e37c89afa91322c1e0f4f2d291392.tar.gz crawl-ref-b95792fc170e37c89afa91322c1e0f4f2d291392.zip |
Refactor additional messages for new monsters spawning.
Not sure why do we need both these and "comes into view".
This includes simplification of:
* shoving the player out of stairs
* "wandering" monsters spawning on the stairs
* fancy messages for in-LOS abyss spawns
For the last part, they had really obscure probabilities, this commit makes
them easier to read. Also, it avoid mallocs and RNG calls, but that's a
rather negligible optimization.
This commit eliminates a mysterious call to viewwindow() as well. A comment
claimed that "Special case: must update the view for monsters created in
player LOS." yet this was not done for band members. It appears removing
that call has no ill effects, but I might have missed something.
Diffstat (limited to 'crawl-ref/source/random.h')
-rw-r--r-- | crawl-ref/source/random.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/random.h b/crawl-ref/source/random.h index f5d04ab49d..b7964d4db3 100644 --- a/crawl-ref/source/random.h +++ b/crawl-ref/source/random.h @@ -92,6 +92,8 @@ T random_choose_weighted(int weight, T first, ...) return chosen; } +const char* random_choose_weighted(int weight, const char* first, ...); + struct dice_def { int num; |