From 4cb881c88f5e1879e89ab2c830a622a2edfb0f82 Mon Sep 17 00:00:00 2001 From: mekolat Date: Thu, 10 Sep 2015 22:30:23 -0400 Subject: do not bind trigger detection to map cells --- src/map/script-fun.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/map/script-fun.cpp') diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index 7e55565..f8c81c4 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -894,6 +894,11 @@ void builtin_puppet(ScriptState *st) nd->bl_m = m; nd->bl_x = x; nd->bl_y = y; + if (HARG(5) && HARG(6)) + { + nd->scr.xs = ((conv_num(st, &AARG(5)) * 2) + 1); // do the same equation as in AST + nd->scr.ys = ((conv_num(st, &AARG(6)) * 2) + 1); + } nd->bl_id = npc_get_new_npc_id(); nd->scr.parent = parent_nd->bl_id; nd->dir = DIR::S; @@ -4312,7 +4317,7 @@ BuiltinFunction builtin_functions[] = BUILTIN(isdead, ""_s, 'i'), BUILTIN(aggravate, "Mxyxyi"_s, '\0'), BUILTIN(fakenpcname, "ssi"_s, '\0'), - BUILTIN(puppet, "mxysi"_s, 'i'), + BUILTIN(puppet, "mxysi??"_s, 'i'), BUILTIN(destroy, "?"_s, '\0'), BUILTIN(getx, ""_s, 'i'), BUILTIN(gety, ""_s, 'i'), -- cgit v1.2.3-70-g09d2