diff options
author | mekolat <mekolat@users.noreply.github.com> | 2016-06-20 16:01:54 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2016-06-20 19:37:12 -0400 |
commit | 8bbe978e36a55743609741de24973b3a2ea00c5c (patch) | |
tree | 9772a1a1124b58dbbebab66253298f573c700824 /src/emap/script_buildins.c | |
parent | 64f9384c639650498995437bc5ecbd1aadd0b8c2 (diff) | |
download | plugin-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.c | 30 |
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)) \ { \ |