summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/coord.cc
diff options
context:
space:
mode:
authorRaphael Langella <raphael.langella@gmail.com>2011-02-22 17:21:22 +0100
committerRaphael Langella <raphael.langella@gmail.com>2011-02-22 23:55:54 +0100
commit9e434b0a9f3893811a6732f947c1de51fa0929cb (patch)
tree086c7bf938658dcec72ca0e397cf3d39cd95c962 /crawl-ref/source/coord.cc
parent8f0f153b837d1947fe2995ada236789d5f7c475a (diff)
downloadcrawl-ref-9e434b0a9f3893811a6732f947c1de51fa0929cb.tar.gz
crawl-ref-9e434b0a9f3893811a6732f947c1de51fa0929cb.zip
Move the clinging code from coord_def to terrain.cc
Diffstat (limited to 'crawl-ref/source/coord.cc')
-rw-r--r--crawl-ref/source/coord.cc30
1 files changed, 0 insertions, 30 deletions
diff --git a/crawl-ref/source/coord.cc b/crawl-ref/source/coord.cc
index bfb93d811b..0507ab6732 100644
--- a/crawl-ref/source/coord.cc
+++ b/crawl-ref/source/coord.cc
@@ -2,12 +2,8 @@
#include "coord.h"
-#include "areas.h"
-#include "coordit.h"
-#include "env.h"
#include "random.h"
#include "state.h"
-#include "terrain.h"
#include "viewgeom.h"
//////////////////////////////////////////////////////////////////////////
@@ -98,29 +94,3 @@ coord_def grid2player(const coord_def &gc)
{
return (gc - you.pos());
}
-
-bool coord_def::can_cling(bool already_clinging) const
-{
- if (!already_clinging && liquefied(*this))
- return false;
-
- for (orth_adjacent_iterator ai(*this); ai; ++ai)
- if (feat_is_wall(env.grid(*ai)))
- return true;
-
- return false;
-}
-
-bool coord_def::can_cling_to(const coord_def& p) const
-{
- if (!in_bounds(p))
- return false;
-
- for (orth_adjacent_iterator ai(*this); ai; ++ai)
- if (feat_is_wall(env.grid(*ai)))
- for (orth_adjacent_iterator ai2(p, false); ai2; ++ai2)
- if (feat_is_wall(env.grid(*ai2)) && distance(*ai, *ai2) <= 1)
- return true;
-
- return false;
-}