diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-25 22:49:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-25 22:49:39 +0300 |
commit | 53fce496581e70f0d99bf91152cc6d7e802e0974 (patch) | |
tree | da324a2b4767916437a8bffcf65b170ba38008ad /src/actions/commands.cpp | |
parent | 3a091245572872f5cda79eab92eb392f92c02b39 (diff) | |
download | plus-53fce496581e70f0d99bf91152cc6d7e802e0974.tar.gz plus-53fce496581e70f0d99bf91152cc6d7e802e0974.tar.bz2 plus-53fce496581e70f0d99bf91152cc6d7e802e0974.tar.xz plus-53fce496581e70f0d99bf91152cc6d7e802e0974.zip |
Move chat command /target into actions.
Diffstat (limited to 'src/actions/commands.cpp')
-rw-r--r-- | src/actions/commands.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 712850a9f..4ae5d0f49 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -286,4 +286,15 @@ impHandler(move) return false; } +impHandler(setTarget) +{ + if (!actorManager || !localPlayer) + return false; + + Being *const target = actorManager->findNearestByName(event.args); + if (target) + localPlayer->setTarget(target); + return true; +} + } // namespace Actions |