diff options
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index f79a16664..7260930fe 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -518,15 +518,16 @@ int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool return 0; } else sd->areanpc_id=0; - if(sd->status.pet_id > 0 && sd->pd && sd->pd->pet.intimate > 0) - { //Check if pet needs to be teleported. [Skotlex] + if( sd->status.pet_id > 0 && sd->pd && sd->pd->pet.intimate > 0 ) + { // Check if pet needs to be teleported. [Skotlex] int flag = 0; struct block_list* bl = &sd->pd->bl; if( !checkpath && !path_search(NULL,bl->m,bl->x,bl->y,dst_x,dst_y,0,CELL_CHKNOPASS) ) flag = 1; else if (!check_distance_bl(&sd->bl, bl, AREA_SIZE)) //Too far, teleport. flag = 2; - if (flag) { + if( flag ) + { unit_movepos(bl,sd->bl.x,sd->bl.y, 0, 0); clif_slide(bl,bl->x,bl->y); } |