diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-26 21:17:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-26 21:17:29 +0300 |
commit | c06c787acceec22845f023b2f849858d36af6585 (patch) | |
tree | e4e6a2831c8a5cf395a2d64095c8417f90c0ba08 /src | |
parent | 7b882f006038b0b24a86ca285afb005125dc5d2d (diff) | |
download | plus-c06c787acceec22845f023b2f849858d36af6585.tar.gz plus-c06c787acceec22845f023b2f849858d36af6585.tar.bz2 plus-c06c787acceec22845f023b2f849858d36af6585.tar.xz plus-c06c787acceec22845f023b2f849858d36af6585.zip |
Move chat command /wait into actions.
Diffstat (limited to 'src')
-rw-r--r-- | src/actions/commands.cpp | 10 | ||||
-rw-r--r-- | src/actions/commands.h | 1 | ||||
-rw-r--r-- | src/commands.cpp | 10 | ||||
-rw-r--r-- | src/commands.h | 5 | ||||
-rw-r--r-- | src/input/inputaction.h | 1 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 11 |
6 files changed, 23 insertions, 15 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 2e0f8d6fe..717c7df09 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -457,4 +457,14 @@ impHandler(info) return true; } +impHandler(wait) +{ + if (localPlayer) + { + localPlayer->waitFor(event.args); + return true; + } + return false; +} + } // namespace Actions diff --git a/src/actions/commands.h b/src/actions/commands.h index d0730fe01..e2b2eefec 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -50,6 +50,7 @@ namespace Actions decHandler(imitation); decHandler(sendMail); decHandler(info); + decHandler(wait); } // namespace Actions #undef decHandler diff --git a/src/commands.cpp b/src/commands.cpp index 64d0e7e52..8f89d59be 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -157,16 +157,6 @@ impHandler(hack) return true; } -impHandler(wait) -{ - if (localPlayer) - { - localPlayer->waitFor(event.args); - return true; - } - return false; -} - impHandler0(uptime) { if (!debugChatTab) diff --git a/src/commands.h b/src/commands.h index 920499582..c5104ee5c 100644 --- a/src/commands.h +++ b/src/commands.h @@ -52,7 +52,6 @@ struct CommandInfo final namespace Commands { decHandler(hack); - decHandler(wait); decHandler(uptime); decHandler(addAttack); decHandler(addPriorityAttack); @@ -94,8 +93,7 @@ namespace Commands enum { - COMMAND_WAIT = 0, - COMMAND_UPTIME, + COMMAND_UPTIME = 0, COMMAND_ADDPRIORITYATTACK, COMMAND_ADDATTACK, COMMAND_REMOVEATTACK, @@ -137,7 +135,6 @@ enum static const CommandInfo commands[] = { - {"wait", &Commands::wait, -1, true}, {"uptime", &Commands::uptime, -1, false}, {"addpriorityattack", &Commands::addPriorityAttack, -1, true}, {"addattack", &Commands::addAttack, -1, true}, diff --git a/src/input/inputaction.h b/src/input/inputaction.h index b5dabdfec..ec410f8f0 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -387,6 +387,7 @@ namespace InputAction UNDRESS, DIRS, INFO, + WAIT, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index 2048b845f..7a7b148cd 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -3252,7 +3252,16 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputAction::NO_VALUE, 50, InputCondition::INGAME, "info", - false} + false}, + {"keyWait", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT, + &Actions::wait, + InputAction::NO_VALUE, 50, + InputCondition::INGAME, + "wait", + true} }; #endif // INPUT_INPUTACTIONMAP_H |