diff options
Diffstat (limited to 'crawl-ref/source/stuff.cc')
-rw-r--r-- | crawl-ref/source/stuff.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc index 74c9250bdd..5e1898cd00 100644 --- a/crawl-ref/source/stuff.cc +++ b/crawl-ref/source/stuff.cc @@ -1090,3 +1090,11 @@ void zap_los_monsters() } } } + +////////////////////////////////////////////////////////////////////////// +// coord_def +int coord_def::distance_from(const coord_def &other) const +{ + return (grid_distance(x, y, other.x, other.y)); +} + |