diff options
author | Bardur Arantsson <bardur@scientician.net> | 2014-12-18 23:38:42 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2014-12-23 12:07:54 +0100 |
commit | 471e7819c6af3b3513770d0784aed22cb5597da7 (patch) | |
tree | e7039d937dda25d49af0fa5f4fad69abb737c80e /src/cmd2.cc | |
parent | c6673027ae73ff19195d5d69020eb6390ec6fd84 (diff) |
Update HOOK_STAIR to new-style hook
Diffstat (limited to 'src/cmd2.cc')
-rw-r--r-- | src/cmd2.cc | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/cmd2.cc b/src/cmd2.cc index 2c42514d..6e1b2245 100644 --- a/src/cmd2.cc +++ b/src/cmd2.cc @@ -86,23 +86,10 @@ static bool_ do_cmd_bash_fountain(int y, int x) */ static bool_ stair_hooks(stairs_direction direction) { - cptr direction_s = (direction == STAIRS_UP) ? "up" : "down"; - - /* Old-style hooks */ - if (process_hooks(HOOK_STAIR, "(s)", direction_s)) - { - return TRUE; /* Prevent movement */ - } - - /* New-style hooks */ - { - hook_stair_in in = { direction }; - hook_stair_out out = { TRUE }; /* Allow by default */ - - process_hooks_new(HOOK_STAIR, &in, &out); - - return (!out.allow); - } + hook_stair_in in = { direction }; + hook_stair_out out = { TRUE }; /* Allow by default */ + process_hooks_new(HOOK_STAIR, &in, &out); + return (!out.allow); } |