summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/losparam.cc
Commit message (Collapse)AuthorAgeFilesLines
* Less los_def usage.Adam Borowski2013-11-051-0/+1
|
* Get rid of grid_appearance().Adam Borowski2013-10-111-4/+2
|
* Improve a comment.Neil Moore2013-10-031-1/+1
|
* Move mons_is_stationary() to struct actor.Adam Borowski2013-09-131-1/+1
| | | | Simplifies code in a number of places, and also fixes a few tree-moving bugs.
* Formatting/brace/trivial returns fixes.Adam Borowski2013-09-031-1/+1
|
* Make pathfinding consider all stationary monsters as obstaclesDracoOmega2013-06-241-4/+1
| | | | | | | | | | Instead of a specific list of (only some!) stationary plants. This would cause monsters to sometimes hang around behind other plants, or statue monsters, rather than take an obvious path to their target only slightly beside them. Hopefully there is nothing else important that relies on the previous assumptions.
* Fix general checks for bush and oklob types to use species when applicable.David Lawrence Ramsey2013-02-201-10/+4
| | | | This ensures that burning bushes and oklob saplings are handled consistently.
* Simplify tree and mangrove handling by using feat_is_tree().David Lawrence Ramsey2013-02-191-1/+1
|
* Drop parentheses around scalar values in "return".Adam Borowski2012-07-051-5/+5
|
* Rename swamp trees to mangroves.Michael Gagno2012-07-031-1/+1
| | | | | Since these are opaque (and therefore behave differently from normal trees), a renaming is warranted.
* Fix a standards compliance issue.Neil Moore2012-01-011-7/+7
| | | | | | | | | | | | | | Per C++11 section 8.5 paragraph 6, a const object cannot be default- initialised unless it belongs to a class with a user-provided default constructor. The opc_* constants are const and belong to a class without an explicit default constructor. Therefore, value-initialise them instead. Most compilers, including latest gcc, will happily accept this construct. However, there was a period during which gcc 4.6 issued a diagnostic (and, without -fpermissive, an error). In particular, this has been reported in gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1, though it is accepted without warning in gcc (Debian 4.6.1-14) 4.6.1.
* Eliminate duplicated symbols.Neil Moore2011-12-271-0/+8
| | | | | | | | | Objects, even const ones, should not be defined in header files, or there will be one copy for each source file that included that header. Move the offending definitions into source files, and replace them with extern declarations in the headers. Also, make the opc_* instances const and not static.
* Fix mimic opacity for different LOS models.Adam Borowski2011-12-111-13/+11
|
* Disambiguate the LOS_SOLID confusion.Adam Borowski2011-12-111-3/+10
| | | | | | | | | | | Its name suggests it's about line of effect, while in fact it's both effect and sight. Thus, I've split its uses into LOS_SOLID and LOS_SOLID_SEE -- the former is what LOS_SOLID was usually understood to mean, the latter is what it actually was (being targettable with an arrow/beam). The difference is: LOS_SOLID_SEE obeys clouds. The name of the latter is abysmal -- if you have a better idea, please sed.
* Merge all the feature mimics into a single monster type.Raphael Langella2011-09-051-14/+3
| | | | It's now possible to create any kind of feature mimic using &M.
* Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-4/+4
| | | | | | | "File:" is shown in your editor's status bar. "Written by:" was used only for the first person who changed a file. We got git for that now, and pre-DCSS history is so woefully inaccurate it doesn't really matter.
* Fix #3424: assertion when targeting beyond door mimic.Johanna Ploog2011-02-141-4/+10
|
* Fix #3436: los not updating when a door mimic is killed.Johanna Ploog2011-02-141-1/+3
|
* Make door mimics block LOS.Adam Borowski2011-02-021-4/+8
| | | | This doesn't do anything to beams, but that's a pending problem anyway.
* Split trees into trees-on-land and trees-on-water.Adam Borowski2011-01-051-3/+4
| | | | | | This gets rid of the hacks where the same tree would turn to either floor or shallow water depending on the branch it is in. Also, only a few methods of destroying trees obeyed the water rule.
* Unify type and id().Adam Borowski2010-12-251-1/+1
|
* Formatting fixes.Adam Borowski2010-12-011-1/+2
|
* Merge branch 'zotdef-0.6' into zotdef-mastermark2010-11-101-0/+5
|\ | | | | | | | | | | Much manual merging, and a few fixes for changes in the code (particularly monsters->monster and the like). Now compiles and seems to work. Zot Def added to start menu.
| * Merge of the original myzotdef branch into the Crawl 0.6Mark Mackey2010-05-051-0/+5
| | | | | | | | release branch. Quite a few edits required...
| * opacity_immob for monster movement.Robert Vollmert2010-02-221-0/+27
| | | | | | | | | | | | | | This moves the previous opacity_no_trans modifications (a9af5253) into a separate opacity_func to avoid conflicts with other uses of opacity_no_trans. (cherry picked from commit d2d2410aa72b9fc18f10e4b1dd38aceeeb602f0c)
| * Clean up opacity_no_trans a bit.Robert Vollmert2010-02-221-9/+4
| | | | | | | | | | | | | | | | | | Base it on opc_default, and consider trees as transparent walls. opacity_no_trans currently affects a variety of things (translocations like blink/apport/portalproj, feeling safe, trap detection); it would be nice to separate these eventually. (cherry picked from commit 48b4f875decad6312c738ee4ffdb6bddbaa9a9cb)
| * Revert "Make trees and plants block opacity_no_trans."Robert Vollmert2010-02-221-23/+6
| | | | | | | | | | | | | | | | | | | | | | This reverts commit a9af525338b34c8a527270bdb5f31574f1e333f8. opacity_no_trans was used for too many things, so this change had undesired side-effects. Will need to make pathfinding independent of opacity_no_trans instead. Fixes issues #778, #836. (cherry picked from commit 7cead1f03d9108d65b9d95142cd61d224bc2aaf4)
* | Revert "make statues block opacity_no_trans". It'd be inconsistent with ↵Adam Borowski2010-09-081-1/+1
| | | | | | | | | | | | | | | | | | other statues. Plus, there are multiple ways for monsters to affect you from behind a statue, so the fix to i_feel_safe needs to be smarter. This reverts commit a61615850d9fe7b3f97026472ebac4147f88b5c9.
* | make statues block opacity_no_transJesse Luehrs2010-09-071-1/+1
| | | | | | | | | | | | | | | | | | this means that monsters behind statues won't make you feel unsafe (mantis #832), and it also blocks apportation from working through granite statues (and also probably some other things like that... is this what we want? the new granite statues on zot:5 are meaningless otherwise). people should test various things with this to make sure the interactions are all still as we want them.
* | Rename class "monsters" to "monster".Robert Vollmert2010-09-051-1/+1
| |
* | Make the enums for trees use singular form, just like all other features.Adam Borowski2010-03-091-3/+3
| |
* | opacity_immob for monster movement.Robert Vollmert2010-02-221-0/+27
| | | | | | | | | | | | This moves the previous opacity_no_trans modifications (a9af5253) into a separate opacity_func to avoid conflicts with other uses of opacity_no_trans.
* | Clean up opacity_no_trans a bit.Robert Vollmert2010-02-221-9/+4
| | | | | | | | | | | | | | | | Base it on opc_default, and consider trees as transparent walls. opacity_no_trans currently affects a variety of things (translocations like blink/apport/portalproj, feeling safe, trap detection); it would be nice to separate these eventually.
* | Revert "Make trees and plants block opacity_no_trans."Robert Vollmert2010-02-221-23/+6
|/ | | | | | | | | | This reverts commit a9af525338b34c8a527270bdb5f31574f1e333f8. opacity_no_trans was used for too many things, so this change had undesired side-effects. Will need to make pathfinding independent of opacity_no_trans instead. Fixes issues #778, #836.
* Make trees and plants block opacity_no_trans.Robert Vollmert2010-02-071-6/+23
| | | | | | | opacity_no_trans is used for you.trans_wall_block, which in turn is used in monster pathfinding. This fixes some pathfinding issues in the new woody swamp. If the "no_trans" opacity is used for other purposes, this change may also have negative side-effects.
* Use grid_appearance instead of env.grid for LOS calculation.Robert Vollmert2009-11-111-1/+3
| | | | | Previously, undetected secret doors in clear rock walls were blocking LOS. Now they don't but do once you detect them...
* Remove a few obsolete includes.Robert Vollmert2009-11-101-1/+0
| | | | Also add a few previously indirect includes.
* Make disintegration splatter not end up behind actors.Robert Vollmert2009-11-101-0/+8
| | | | | | | | Also not at actors' feet. Might be even nicer to have them thrown as missiles: You are hit by a piece of orc flesh. The giant bat is hit by a chunk of yak flesh. The giant bat dies.
* Add opc_no_trans and use that for see_cell_no_trans.Robert Vollmert2009-11-081-1/+17
| | | | | | | | | The difference between no_trans and solid is whether granite statues are considered opaque. Granite statues are somewhat weird in that they behave completely differently from other statues: You can't shoot missiles at or past them, no items can be in their cell, etc.
* Replace bounds_func with circle_def.Robert Vollmert2009-11-081-12/+0
| | | | | | | The various LOS objects and functions now accept a circle_def instead of a bounds_func. This is a little less generic, but should eventually help with iterating over coordinates in any los_def.
* Remove an unnecessary header env.h include.Robert Vollmert2009-11-081-0/+1
|
* Make many checks for monster (non)existence on squares use monster_at().David Lawrence Ramsey2009-11-051-4/+3
| | | | | | | Not all are changed yet, as there are several index checks still needed for debugging purposes. Also, make many checks for player/monster (non)existence use actor_at().
* Clean up some unused #includesAdam Borowski2009-10-221-1/+0
|
* versioning: remove SVN-specific revision data, add Git versioningSteven Noonan2009-10-181-1/+0
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Replace monster_los by calls to losight.Robert Vollmert2009-10-171-0/+9
| | | | | | | | | los_param got a new opacity_monmove to help. The change compiles and the game runs, but I'm unsure how to test monster pathfinding. Please tell me if anything went wrong! Removes mon-los.{cc,h}, so I'm afraid I may have broken the non-Unix builds again.
* Make default LOS configurable.Robert Vollmert2009-10-171-1/+1
| | | | | | Setting LOS_RADIUS in defines.h now works. Fixed a couple of things to allow this, including an apparent off-by-one error in crawl_view -- not quite sure this doesn't break anything.
* Clean up LOS precalculation settings.Robert Vollmert2009-10-171-1/+1
| | | | | | The maximal boundary within which losight/find_ray will work is now clearly defined at the start of los.cc. By default, it's the circle with radius LOS_MAX_RADIUS == LOS_RADIUS.
* Naming consistency.Robert Vollmert2009-10-171-3/+3
| | | | | Mostly rename functions from terrain.h that accept features of typ dgn_feature_type from grid_is_* to feat_is_*.
* Rewrite cell_see_cell using exists_ray.Robert Vollmert2009-10-161-0/+8
| | | | For this, add new opacity_func that disregards half-opaque things.
* Get rid of los_param outside of los.cc/losparam.cc.Robert Vollmert2009-10-161-99/+14
| | | | | | | | | | | The nicer interface to losight is now void losight(env_show_grid& sh, const coord_def& center, const opacity_func &opc = opc_default, const bounds_func &bds = bds_default); bounds_func provides the LOS boundary (usually just a circle with radius the current LOS radius). opacity_func is a mapping of grid coordinates to opacity values.