summaryrefslogtreecommitdiff
path: root/src/emap/script_buildins.c
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-06-20 16:01:54 -0400
committermekolat <mekolat@users.noreply.github.com>2016-06-20 19:37:12 -0400
commit8bbe978e36a55743609741de24973b3a2ea00c5c (patch)
tree9772a1a1124b58dbbebab66253298f573c700824 /src/emap/script_buildins.c
parent64f9384c639650498995437bc5ecbd1aadd0b8c2 (diff)
downloadplugin-8bbe978e36a55743609741de24973b3a2ea00c5c.tar.gz
plugin-8bbe978e36a55743609741de24973b3a2ea00c5c.tar.bz2
plugin-8bbe978e36a55743609741de24973b3a2ea00c5c.tar.xz
plugin-8bbe978e36a55743609741de24973b3a2ea00c5c.zip
add buildin setfakecells (fake client-side collision)
Diffstat (limited to 'src/emap/script_buildins.c')
-rw-r--r--src/emap/script_buildins.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c
index 28391cf..6a34298 100644
--- a/src/emap/script_buildins.c
+++ b/src/emap/script_buildins.c
@@ -1805,6 +1805,36 @@ BUILDIN(setLook)
return true;
}
+BUILDIN(setFakeCells)
+{
+ const int x1 = script_getnum(st, 2);
+ const int y1 = script_getnum(st, 3);
+ int x2 = x1, y2 = y1, block_type = 0;
+
+ if (script_hasdata(st, 6))
+ {
+ if (script_isinttype(st, 5) && script_isinttype(st, 6))
+ {
+ x2 = script_getnum(st, 4);
+ y2 = script_getnum(st, 5);
+ block_type = script_getnum(st, 6);
+ }
+ else
+ {
+ ShowError("all arguments must be of type int");
+ return false;
+ }
+ }
+ else
+ {
+ block_type = script_getnum(st, 4);
+ }
+
+ getSD();
+ send_setwall_single(sd->fd, sd->bl.m, 0, x1, y1, x2, y2, block_type);
+ return true;
+}
+
#define checkHashTableExists(id) \
if (!htreg->hashtable_exists(id)) \
{ \