From f2a19d9971bb076f4a80a9e41ba601bc862d0fdf Mon Sep 17 00:00:00 2001 From: dshaligram Date: Thu, 26 Jul 2007 11:06:09 +0000 Subject: 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 --- crawl-ref/source/player.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/player.cc') 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); } -- cgit v1.2.3-54-g00ecf