diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-30 10:53:06 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-30 10:53:06 +0000 |
commit | 262b8e18ed8cb58afb40a816ac0fdedfe3a7db5f (patch) | |
tree | 681a9cbb6c22669c6e8b7ab749228a3cd691a903 /crawl-ref/source/delay.cc | |
parent | 51d8f1fc9cc8ed4280b9c53b135ccb0521e84889 (diff) | |
download | crawl-ref-262b8e18ed8cb58afb40a816ac0fdedfe3a7db5f.tar.gz crawl-ref-262b8e18ed8cb58afb40a816ac0fdedfe3a7db5f.zip |
Massive overhaul to move towards coord_def().
This might have introduced some bugs: I now get intermittent crashes
on startup (this might have to do with the changes to special_room.)
Sorry about that - committing before I need to do any more big conflict
resolutions. Fixes coming later.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6732 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/delay.cc')
-rw-r--r-- | crawl-ref/source/delay.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index 861b68bb1e..99f27f96fa 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -222,7 +222,7 @@ static int _recite_to_monsters(coord_def where, int pow, int unused) static std::string _get_recite_speech(const std::string key, int weight) { - seed_rng( weight + you.x_pos + you.y_pos); + seed_rng( weight + you.pos().x + you.pos().y); const std::string str = getSpeakString("zin_recite_speech_" + key); if (!str.empty()) @@ -728,8 +728,7 @@ void handle_delay( void ) // original and that's why we do it this way. if (is_valid_item(mitm[ delay.parm1 ]) && mitm[ delay.parm1 ].base_type == OBJ_CORPSES - && mitm[ delay.parm1 ].x == you.x_pos - && mitm[ delay.parm1 ].y == you.y_pos) + && mitm[ delay.parm1 ].pos == you.pos()) { if (mitm[ delay.parm1 ].sub_type == CORPSE_SKELETON) { @@ -1421,7 +1420,7 @@ static command_type _get_running_command() else if (Options.travel_delay > 0) delay(Options.travel_delay); - return direction_to_command( you.running.x, you.running.y ); + return direction_to_command( you.running.pos.x, you.running.pos.y ); } static void _handle_run_delays(const delay_queue_item &delay) |