diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/magic-stmt.c | 9 | ||||
-rw-r--r-- | src/map/pc.c | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/map/magic-stmt.c b/src/map/magic-stmt.c index a318314..b9833d6 100644 --- a/src/map/magic-stmt.c +++ b/src/map/magic-stmt.c @@ -405,6 +405,7 @@ static void entity_warp (entity_t * target, int destm, int destx, int desty) case BL_PC: { character_t *character = (character_t *) target; + char *map_name; clif_clearchar_area (&character->bl, 3); map_delblock (&character->bl); character->bl.x = destx; @@ -414,9 +415,13 @@ static void entity_warp (entity_t * target, int destm, int destx, int desty) pc_touch_all_relevant_npcs (character); // Note that touching NPCs may have triggered warping and thereby updated x and y: - clif_changemap (character, map[character->bl.m].name, - character->bl.x, character->bl.y); + map_name = map[character->bl.m].name; + // Warp part #1: update relevant data, interrupt trading etc.: + pc_setpos (character, map_name, character->bl.x, character->bl.y, 0); + // Warp part #2: now notify the client + clif_changemap (character, map_name, + character->bl.x, character->bl.y); break; } case BL_MOB: diff --git a/src/map/pc.c b/src/map/pc.c index 748abf9..bf819a1 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4046,7 +4046,7 @@ int pc_setpos (struct map_session_data *sd, char *mapname_org, int x, int y, if (pc_issit (sd)) { - pc_setstand (sd); +// pc_setstand (sd); // [fate] Nothing wrong with warping while sitting skill_gangsterparadise (sd, 0); } |