summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-27 16:49:12 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-27 16:49:12 +0300
commit8f173afdd496eda7fddd2b166e11626651600501 (patch)
tree422b3dde21b2f040f953cf26f8433e74aec2e2e0 /src/actions
parent56178bf525b07582389493158ac90e2ab7721571 (diff)
downloadmanaplus-8f173afdd496eda7fddd2b166e11626651600501.tar.gz
manaplus-8f173afdd496eda7fddd2b166e11626651600501.tar.bz2
manaplus-8f173afdd496eda7fddd2b166e11626651600501.tar.xz
manaplus-8f173afdd496eda7fddd2b166e11626651600501.zip
Move chat command /debugspawn into actions.
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/commands.cpp14
-rw-r--r--src/actions/commands.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index bb174cb07..78a0df060 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -686,4 +686,18 @@ impHandler(hack)
return true;
}
+impHandler0(debugSpawn)
+{
+ int cnt = atoi(event.args.c_str());
+ if (cnt < 1)
+ cnt = 1;
+ const int half = cnt / 2;
+ for (int x = -half; x < cnt - half; x ++)
+ {
+ for (int y = -half; y < cnt - half; y ++)
+ actorManager->cloneBeing(localPlayer, x, y, cnt);
+ }
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index cc9a0e172..1d6e5bd9d 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -70,6 +70,7 @@ namespace Actions
decHandler(talkPet);
decHandler(gm);
decHandler(hack);
+ decHandler(debugSpawn);
} // namespace Actions
#undef decHandler