Browse Source

Fixed unitwalk and unitwalkto label reset

Fixed #2222

Thanks to @zellkennedy
Lemongrass3110 7 years ago
parent
commit
2072fe3643
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/map/unit.c

+ 3 - 1
src/map/unit.c

@@ -408,8 +408,10 @@ static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data
 	ud->walktimer = INVALID_TIMER;
 
 	if (bl->x == ud->to_x && bl->y == ud->to_y) {
-		if (ud->walk_done_event[0])
+		if (ud->walk_done_event[0]){
 			npc_event_do_id(ud->walk_done_event,bl->id);
+			ud->walk_done_event[0] = 0;
+		}
 		if (ud->state.walk_script)
 			ud->state.walk_script = 0;
 	}