summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-pathfind.h
Commit message (Collapse)AuthorAgeFilesLines
* Chance function(void) to function()reaverb2014-05-241-4/+4
|
* Make friendly summons prefer paths that never leave the player's sightDracoOmega2014-02-251-0/+4
| | | | | | | | Sometimes the shortest path that a monster could see to its target would follow a route the player themselves couldn't see, which would cause them to oscillate back and forth at the edge of sight, moving away and then immediately returning once they left your view. Now they should elect to take longer paths that they can actually follow.
* Drop double newlines where they seem to serve no purpose.Adam Borowski2013-12-211-1/+0
| | | | | Sometimes, they're there to emphasize a break between two sections of code, which is good. In a majority of cases, though, they're just inconsistent.
* Revert "Bye bye clinging."Raphael Langella2013-08-121-0/+1
| | | | | | | | | | | | | Clinging might be a minor feature, but it's a distinguishing one, it's thematic and it's working quite well. Player/monster symmetry has never been a goal, so it seems dubious to invoke it as the reason to throw away all the work that has been put into clinging. We can always say that the player turns into a different kind of spider which is unable to cling for some reason. This reverts commit bdc56382eacf7af1b2330dc6444916d368741fec. This reverts commit d689486464fcaaac025a6f469ab69674a2f4d173. This reverts commit 1addaaf8ee92de5060fdb436f93251843abd2035.
* Purge a function.Adam Borowski2013-07-101-1/+0
| | | | It degenerated away with clinging removal.
* Use std namespace.Raphael Langella2012-08-261-3/+3
| | | | | | | | | | | | | 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.
* Allow wall clinging when on liquefied ground.Raphael Langella2011-02-241-3/+0
| | | | Preventing it isn't very interseting, and allowing it makes the code much simpler.
* Implement proper pathfinding for clinging spiders.Raphael Langella2011-02-231-0/+3
|
* Rename class "monsters" to "monster".Robert Vollmert2010-09-051-4/+4
|
* Fix monsters not using doors.Robert Vollmert2010-03-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, monsters would only open doors if they were straight on the way to their target. E.g.: @#g .+. g won't open the door if its target is @. This can be reproduced for example as follows (eg Sprint 1 start): .1#3. ..+.2 ..### Stand at one, open door, place monster at 2, close door. The monster will move to 3 and wait there until you open the door. I'm not sure why monsters didn't fall back to pathfinding if they couldn't get to you directly. These changes also unify some monster traversability checks between mon-pathfind and mon-act.
* Fix newlines at end of file.Adam Borowski2010-01-211-1/+0
|
* Remove trailing whitespace.David Lawrence Ramsey2009-11-201-2/+2
|
* Split monster_pathfind out into mon-pathfind.cc.Robert Vollmert2009-11-161-0/+69