summaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-31 13:28:46 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-31 13:28:46 +0300
commit3d32a17af9cdfffda1e1612afeef976fbe218212 (patch)
treee3b974c0773e13f986b5194847f8e3395287583f /src/commands.cpp
parent6bedbd1724e575a152250eeda7988423d01680ba (diff)
downloadmv-3d32a17af9cdfffda1e1612afeef976fbe218212.tar.gz
mv-3d32a17af9cdfffda1e1612afeef976fbe218212.tar.bz2
mv-3d32a17af9cdfffda1e1612afeef976fbe218212.tar.xz
mv-3d32a17af9cdfffda1e1612afeef976fbe218212.zip
Add to debugSpawn mass spawn function.
Now debuSpawn accept parameter with side size of rectangle with spawned clones.
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 51ce93f85..e92d79eaf 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -84,6 +84,7 @@
#include "utils/delete2.h"
#include "utils/gettext.h"
+#include "utils/mathutils.h"
#include "utils/process.h"
#include "utils/timer.h"
@@ -1540,7 +1541,15 @@ impHandler0(dumpOGL)
impHandler0(debugSpawn)
{
- Being *const being = actorManager->cloneBeing(localPlayer);
+ int cnt = atoi(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);
+ }
}
void replaceVars(std::string &str)