summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-26 11:06:09 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-26 11:06:09 +0000
commitf2a19d9971bb076f4a80a9e41ba601bc862d0fdf (patch)
treebe553fe84132e1f25d5f33fb98f703378096b961 /crawl-ref/source/player.cc
parentbc1a54904787e2f4779a99f2be1f72f6fd87679b (diff)
downloadcrawl-ref-f2a19d9971bb076f4a80a9e41ba601bc862d0fdf.tar.gz
crawl-ref-f2a19d9971bb076f4a80a9e41ba601bc862d0fdf.zip
Replaced timed markers with Lua markers. Breaks save compatibility.
KFEAT: feature names are now as in the dungeon_feature_type enum. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1930 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index c3458c2eb7..1c6d08afe3 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -34,6 +34,7 @@
#include "clua.h"
#include "delay.h"
+#include "dgnevent.h"
#include "effects.h"
#include "fight.h"
#include "food.h"
@@ -5523,14 +5524,16 @@ bool player::is_icy() const
void player::moveto(int x, int y)
{
- x_pos = x;
- y_pos = y;
- crawl_view.set_player_at(coord_def(x, y));
+ moveto(coord_def(x, y));
}
void player::moveto(const coord_def &c)
{
+ const bool real_move = c != pos();
x_pos = c.x;
y_pos = c.y;
crawl_view.set_player_at(c);
+
+ if (real_move)
+ dungeon_events.fire_position_event(DET_PLAYER_MOVED, c);
}