diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-06-07 20:18:59 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-06-08 06:18:08 +0200 |
commit | a11ad32d1903074f289bfea570b75ce6c6b7b7e7 (patch) | |
tree | af13f6f38a45d28323ca0ad2aabab3a7d00a272f /src/cmd1.c | |
parent | 6c7a878b3a522f554ec7b11cb1cad929676d97ff (diff) |
Lua: Add new-style hook support for HOOK_MOVE
Diffstat (limited to 'src/cmd1.c')
-rw-r--r-- | src/cmd1.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -3098,6 +3098,13 @@ void move_player_aux(int dir, int do_pickup, int run, bool_ disarm) /* Some hooks */ if (process_hooks(HOOK_MOVE, "(d,d)", y, x)) return; + { + hook_move_in in = { y, x }; + if (process_hooks_new(HOOK_MOVE, &in, NULL)) { + return; /* Prevent movement */ + } + } + if (p_ptr->dripping_tread > 0) { geomancy_random_floor(y, x, FALSE); |