Fixed unitwalk with the same event name (#4204)

Fixes #4118
This commit is contained in:
Sader Fawall 2020-01-18 01:29:56 +02:00 committed by Lemongrass3110
parent bacaff8383
commit 4f0894c4f9

View File

@ -416,6 +416,9 @@ static TIMER_FUNC(unit_walktoxy_timer){
// Copying is required in case someone uses unitwalkto inside the event code
safestrncpy(walk_done_event, ud->walk_done_event, EVENT_NAME_LENGTH);
//Clear the event
ud->walk_done_event[0] = 0;
ud->state.walk_script = true;
// Execute the event
@ -434,11 +437,6 @@ static TIMER_FUNC(unit_walktoxy_timer){
return 0;
}
// Check if another event was set
if( !strcmp(ud->walk_done_event,walk_done_event) ){
// If not remove it
ud->walk_done_event[0] = 0;
}
}
}