summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-28 19:36:50 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-28 19:36:50 +0300
commita5e3d86efb85bb2a65e160972cc56e89cd764453 (patch)
treef385447603a24a3898b493ce131b4edf8abd86ab /src/actions
parent8bfdc250ae7c5ab852653b3aa2da7f3781c7c56e (diff)
downloadplus-a5e3d86efb85bb2a65e160972cc56e89cd764453.tar.gz
plus-a5e3d86efb85bb2a65e160972cc56e89cd764453.tar.bz2
plus-a5e3d86efb85bb2a65e160972cc56e89cd764453.tar.xz
plus-a5e3d86efb85bb2a65e160972cc56e89cd764453.zip
Add chat command for stop and start pet ai.
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/pets.cpp10
-rw-r--r--src/actions/pets.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/actions/pets.cpp b/src/actions/pets.cpp
index 64ac81e83..e211ff0ac 100644
--- a/src/actions/pets.cpp
+++ b/src/actions/pets.cpp
@@ -201,4 +201,14 @@ impHandler0(petDirectRight)
return true;
}
+impHandler0(petAiStart)
+{
+ petHandler->startAi(true);
+}
+
+impHandler0(petAiStop)
+{
+ petHandler->startAi(false);
+}
+
} // namespace Actions
diff --git a/src/actions/pets.h b/src/actions/pets.h
index 4aed1d94c..25066df38 100644
--- a/src/actions/pets.h
+++ b/src/actions/pets.h
@@ -40,6 +40,8 @@ namespace Actions
decHandler(petDirectDown);
decHandler(petDirectLeft);
decHandler(petDirectRight);
+ decHandler(petAiStart);
+ decHandler(petAiStop);
} // namespace Actions
#undef decHandler