OnTouch support when npc is walking (#5134)

* Added support to trigger 'OnTouch'/'OnTouch_' npc label when a npc is moving through npcwalkto script command.
* Fixed #502

Thanks to @aleos89, @wbgneto !
This commit is contained in:
Atemo
2020-06-26 15:59:39 +02:00
committed by GitHub
parent 11164b275c
commit 0f9dde4e33
6 changed files with 143 additions and 108 deletions

View File

@@ -2663,7 +2663,7 @@ bool map_addnpc(int16 m,struct npc_data *nd)
}
// npcs with trigger area are grouped
// 0 < npc_num_warp < npc_num_area < npc_num
if (xs < 0 && ys < 0)
if (xs < 0 || ys < 0)
mapdata->npc[ mapdata->npc_num ] = nd;
else {
switch (nd->subtype) {