diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-24 01:48:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-24 01:48:07 +0300 |
commit | 6a67f52f6b82bb8c6259eb0b9282ab543347b9ee (patch) | |
tree | bd0741506b3f69e98cdcaa99d2ccb40db86291d5 /src/actions | |
parent | e22f6d0070ea2b0102caf3b738fba703606e6bd4 (diff) | |
download | manaplus-6a67f52f6b82bb8c6259eb0b9282ab543347b9ee.tar.gz manaplus-6a67f52f6b82bb8c6259eb0b9282ab543347b9ee.tar.bz2 manaplus-6a67f52f6b82bb8c6259eb0b9282ab543347b9ee.tar.xz manaplus-6a67f52f6b82bb8c6259eb0b9282ab543347b9ee.zip |
Remove unused pet handler methods and fields.
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/pets.cpp | 28 | ||||
-rw-r--r-- | src/actions/pets.h | 2 |
2 files changed, 7 insertions, 23 deletions
diff --git a/src/actions/pets.cpp b/src/actions/pets.cpp index 0aa0f29be..b978b26b5 100644 --- a/src/actions/pets.cpp +++ b/src/actions/pets.cpp @@ -76,9 +76,7 @@ static const Being *getPet() impHandler(commandEmotePet) { - // need use actual pet id - petHandler->emote(CAST_U8( - atoi(event.args.c_str())), 0); + petHandler->emote(CAST_U8(atoi(event.args.c_str()))); return true; } @@ -123,7 +121,7 @@ impHandler(petEmote) { const int emotion = event.action - InputAction::PET_EMOTE_1; if (emoteShortcut) - petHandler->emote(emoteShortcut->getEmote(emotion), 0); + petHandler->emote(emoteShortcut->getEmote(emotion)); if (Game::instance()) Game::instance()->setValidSpeed(); return true; @@ -166,7 +164,7 @@ impHandler0(petMoveUp) const Being *const pet = getPet(); if (!pet) return false; - petHandler->move(0, pet->getTileX(), pet->getTileY() - 1); + petHandler->move(pet->getTileX(), pet->getTileY() - 1); return true; } @@ -175,7 +173,7 @@ impHandler0(petMoveDown) const Being *const pet = getPet(); if (!pet) return false; - petHandler->move(0, pet->getTileX(), pet->getTileY() + 1); + petHandler->move(pet->getTileX(), pet->getTileY() + 1); return true; } @@ -184,7 +182,7 @@ impHandler0(petMoveLeft) const Being *const pet = getPet(); if (!pet) return false; - petHandler->move(0, pet->getTileX() - 1, pet->getTileY()); + petHandler->move(pet->getTileX() - 1, pet->getTileY()); return true; } @@ -193,7 +191,7 @@ impHandler0(petMoveRight) const Being *const pet = getPet(); if (!pet) return false; - petHandler->move(0, pet->getTileX() + 1, pet->getTileY()); + petHandler->move(pet->getTileX() + 1, pet->getTileY()); return true; } @@ -221,18 +219,6 @@ impHandler0(petDirectRight) return true; } -impHandler0(petAiStart) -{ - petHandler->startAi(true); - return true; -} - -impHandler0(petAiStop) -{ - petHandler->startAi(false); - return true; -} - impHandler(petMove) { int x = 0; @@ -240,7 +226,7 @@ impHandler(petMove) if (parse2Int(event.args, x, y)) { - petHandler->move(0, x, y); + petHandler->move(x, y); return true; } return false; diff --git a/src/actions/pets.h b/src/actions/pets.h index cd3535fa2..e27d5abde 100644 --- a/src/actions/pets.h +++ b/src/actions/pets.h @@ -40,8 +40,6 @@ namespace Actions decHandler(petDirectDown); decHandler(petDirectLeft); decHandler(petDirectRight); - decHandler(petAiStart); - decHandler(petAiStop); decHandler(petMove); } // namespace Actions |