From 5b49e94e000d31299e9e97e339e7ad273cdfa032 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 13 Oct 2015 00:32:49 +0300 Subject: Remove first moving tile if being already moving. This fix random one tile wrong moving. --- src/emap/clif.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/emap/clif.c') diff --git a/src/emap/clif.c b/src/emap/clif.c index 91e7260..4eec6a6 100644 --- a/src/emap/clif.c +++ b/src/emap/clif.c @@ -13,6 +13,7 @@ #include "common/socket.h" #include "common/strlib.h" #include "common/cbasetypes.h" +#include "common/timer.h" #include "map/guild.h" #include "map/mob.h" #include "map/npc.h" @@ -434,14 +435,19 @@ void eclif_set_unit_walking(struct block_list* bl, TBL_PC *tsd, { TBL_PC *sd = BL_CAST(BL_PC, ud->bl); if (!sd || !pc_isinvisible(sd)) - send_advmoving(ud, tsd ? &tsd->bl : bl, *target); + { + if (ud->walktimer != INVALID_TIMER) + send_advmoving(ud, true, tsd ? &tsd->bl : bl, *target); + else + send_advmoving(ud, false, tsd ? &tsd->bl : bl, *target); + } } void eclif_move(struct unit_data *ud) { TBL_PC *sd = BL_CAST(BL_PC, ud->bl); if (!sd || !pc_isinvisible(sd)) - send_advmoving(ud, ud->bl, AREA_WOS); + send_advmoving(ud, false, ud->bl, AREA_WOS); } void eclif_parse_LoadEndAck_pre(int *fdPtr __attribute__ ((unused)), -- cgit v1.2.3-60-g2f50