summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/pets.cpp17
-rw-r--r--src/actions/pets.h1
2 files changed, 18 insertions, 0 deletions
diff --git a/src/actions/pets.cpp b/src/actions/pets.cpp
index 109da80cd..2247e0533 100644
--- a/src/actions/pets.cpp
+++ b/src/actions/pets.cpp
@@ -191,4 +191,21 @@ impHandler0(petAiStop)
return true;
}
+impHandler0(petMove)
+{
+ const Being *const pet = getPet();
+ if (!pet)
+ return false;
+
+ int x = 0;
+ int y = 0;
+
+ if (parse2Int(event.args, x, y))
+ {
+ petHandler->move(pet->getId(), x, y);
+ return true;
+ }
+ return false;
+}
+
} // namespace Actions
diff --git a/src/actions/pets.h b/src/actions/pets.h
index ba8ef36d3..597be91f3 100644
--- a/src/actions/pets.h
+++ b/src/actions/pets.h
@@ -42,6 +42,7 @@ namespace Actions
decHandler(petDirectRight);
decHandler(petAiStart);
decHandler(petAiStop);
+ decHandler(petMove);
} // namespace Actions
#undef decHandler