summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/shout.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove player blood/web sense of out-of-sight monstersChris Campbell2014-03-141-1/+0
| | | | | | | It was very unlikely to ever trigger - caused by a monster somehow being made to bleed just out of your LOS in the blood sense case, or a monster being caught in a web while you are in spider form in the web sense case, and even less likely to actually be useful if it did somehow trigger.
* Use std namespace.Raphael Langella2012-08-261-1/+1
| | | | | | | | | | | | | I had to rename distance() (in coord.h) to distance2() because it conflicts with the STL function to compare 2 iterators. Not a bad change given how it returns the square of the distance anyway. I also had to rename the message global variable (in message.cc) to buffer. I tried to fix and improve the coding style has much as I could, but I probably missed a few given how huge and tedious it is. I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool and util/levcomp.*, because I have no clue about those.
* Spiders sense when trapped in webPete Hurst2011-08-311-0/+3
|
* Simplify Singing Sword speech code, vary its loudness.Adam Borowski2011-07-071-0/+1
|
* Remove redundant force_monster_shout() function.David Lawrence Ramsey2011-04-211-1/+0
|
* Toss noisy_equipment() away from it_use3.ccAdam Borowski2011-04-141-0/+2
| | | | All other noise effects are in shout.cc.
* Fix orb pickup noise when silenced.Jude Brown2011-01-221-1/+3
| | | | | | | | | | | | Now, it flashes a variety of coloured, pretty lights, which have the same effect of waking up nearby monsters. This is achieved by "fake_noisy", which generates noise (but no message) regardless of whether or not the area is silenced. However, it has just occurred to me that the latter function might cause weird interactions with mesmerisation and fear. Might be something to keep in mind if its use is extended to areas where mermaids or other monsters might be causing fear/mesmerising.
* New noise propagation system.Darshan Shaligram2011-01-071-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old noise propagation system alerted all monsters within `loudness' radius of the noise source, ignoring obstacles between the observer and the noise source. The new noise system applies only to monsters; the player is still messaged as before. This is for two reasons: 1. noisy() must return if the player heard the noise, which forces us to propagate the noise immediately for each noise, an unacceptable overhead on busy maps (such as Sprint). Therefore we cheat and use the old noise rules for the player. This is relatively simple to work around, since not many code paths rely on the noisy() return code, and these places can be changed to work around this lack of information. 2. The new noise system allows loud noises to drown out quiet noises. This may be an unacceptable loss of information for the player. The new system keeps track of noises produced by noisy(), but does not act on them immediately. Instead, all noises are processed in world_reacts. Noises are processed by a simple flood-out from their sources, attenuated by distance, terrain (such as closed doors, trees), and by twists in the noise's path (a winding corridor attenuates noise more than a straight line). Noise propagation and attenuation uses movement geometry, not LOS geometry, *but* attenuation assumes it is harder for the noise to change direction than to keep going in its old direction. To simplify handling of noises, it is assumed that louder noises overwhelm quieter noises. An actor exposed to both a loud and a quiet noise at the same distance will hear only the loud noise. However, an actor closer to the quiet noise than the loud noise will hear first the quiet noise, then the loud noise (because the floodfill visits points at an increasing radius from each noise source). Given two equally loud noises, the closer noise will always win. Multiple quiet noises emitted close together do not combined into a louder noise. Monsters hearing a noise at a distance from its source may not correctly guess the noise's origin if the noise did not travel in a straight line to the monster. Noises are currently processed before and after handle_monsters() so that monsters can react to noises produced by the player and by each other. We could conceivably drop one of the apply_noises() calls (probably the one after handle_monsters()) without adverse effects. Since the new noise system allows closed doors to cut off sound, I've dropped the Sprint noise attenuation from 1/3 to 1/2. If Crawl is compiled with DEBUG_NOISE_PROPAGATION, it will write a noise-grid.html dump file showing noise sources and intensities on the map for each call to apply_noises that processed a noise.
* Massive spacing fixes: "( spaces after parentheses )".Adam Borowski2010-10-151-1/+1
| | | | | | I did review it manually to find places where they made sense (like some tables), but for a massive sed job like this there might be places that I missed.
* Rename class "monsters" to "monster".Robert Vollmert2010-09-051-3/+3
|
* Rename variables named "monster" to "mons" or similar.Robert Vollmert2010-09-051-3/+3
|
* Make force_monster_shout() available outside wizard mode.David Lawrence Ramsey2010-05-031-0/+1
|
* Fix newlines at end of file.Adam Borowski2010-01-211-1/+0
|
* Split shouting and stealth code from view.cc.Robert Vollmert2009-11-101-0/+13