summaryrefslogtreecommitdiff
path: root/src/cmd1.c
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-06-07 20:18:59 +0200
committerBardur Arantsson <bardur@scientician.net>2012-06-08 06:18:08 +0200
commita11ad32d1903074f289bfea570b75ce6c6b7b7e7 (patch)
treeaf13f6f38a45d28323ca0ad2aabab3a7d00a272f /src/cmd1.c
parent6c7a878b3a522f554ec7b11cb1cad929676d97ff (diff)
Lua: Add new-style hook support for HOOK_MOVE
Diffstat (limited to 'src/cmd1.c')
-rw-r--r--src/cmd1.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cmd1.c b/src/cmd1.c
index 37e12f61..ce43c008 100644
--- a/src/cmd1.c
+++ b/src/cmd1.c
@@ -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);