Corrected script command getmapxy (#3922)
* Fixed an issue with floating NPC being on an 'invalid' map and attempting to store the map name. Thanks to @Atemo!
This commit is contained in:
parent
ad2eabb906
commit
5908c0484f
@ -15033,7 +15033,10 @@ BUILDIN_FUNC(getmapxy)
|
||||
|
||||
x= bl->x;
|
||||
y= bl->y;
|
||||
safestrncpy(mapname, map_getmapdata(bl->m)->name, MAP_NAME_LENGTH);
|
||||
if (bl->m >= 0)
|
||||
safestrncpy(mapname, map_getmapdata(bl->m)->name, MAP_NAME_LENGTH);
|
||||
else
|
||||
memset(mapname, '\0', sizeof(mapname));
|
||||
|
||||
//Set MapName$
|
||||
num=st->stack->stack_data[st->start+2].u.num;
|
||||
|
Loading…
x
Reference in New Issue
Block a user