Fixed dead monsters stuck after killed (#5263)
This commit is contained in:
parent
667645c2e2
commit
fa363b972d
@ -1336,6 +1336,8 @@ int hom_ressurect(struct map_session_data* sd, unsigned char per, short x, short
|
||||
clif_spawn(&hd->bl);
|
||||
}
|
||||
|
||||
hd->ud.state.blockedmove = false;
|
||||
|
||||
#ifdef RENEWAL
|
||||
sc_start(&sd->bl, &sd->bl, SC_HOMUN_TIME, 100, 1, skill_get_time(AM_CALLHOMUN, 1));
|
||||
#endif
|
||||
|
@ -1154,6 +1154,7 @@ int mob_spawn (struct mob_data *md)
|
||||
|
||||
md->state.aggressive = status_has_mode(&md->status,MD_ANGRY)?1:0;
|
||||
md->state.skillstate = MSS_IDLE;
|
||||
md->ud.state.blockedmove = false;
|
||||
md->next_walktime = tick+rnd()%1000+MIN_RANDOMWALKTIME;
|
||||
md->last_linktime = tick;
|
||||
md->dmgtick = tick - 5000;
|
||||
|
@ -811,7 +811,7 @@ static TIMER_FUNC(unit_walktobl_sub){
|
||||
struct block_list *bl = map_id2bl(id);
|
||||
struct unit_data *ud = bl?unit_bl2ud(bl):NULL;
|
||||
|
||||
if (ud && ud->walktimer == INVALID_TIMER && ud->target == data) {
|
||||
if (ud && ud->walktimer == INVALID_TIMER && ud->target && ud->target == data) {
|
||||
if (DIFF_TICK(ud->canmove_tick, tick) > 0) // Keep waiting?
|
||||
add_timer(ud->canmove_tick+1, unit_walktobl_sub, id, data);
|
||||
else if (unit_can_move(bl)) {
|
||||
@ -3041,6 +3041,9 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
|
||||
if (ud->walktimer != INVALID_TIMER)
|
||||
unit_stop_walking(bl,0);
|
||||
|
||||
if (clrtype == CLR_DEAD)
|
||||
ud->state.blockedmove = true;
|
||||
|
||||
if (ud->skilltimer != INVALID_TIMER)
|
||||
unit_skillcastcancel(bl,0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user