diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/unit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index f5784b405..61a85d431 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -529,7 +529,8 @@ static int unit_walktoxy(struct block_list *bl, short x, short y, int flag) ud = unit->bl2ud(bl); - if( ud == NULL) return 0; + if (ud == NULL) + return 0; if (battle_config.check_occupied_cells && (flag&8) && !map->closest_freecell(bl->m, bl, &x, &y, BL_CHAR|BL_NPC, 1)) //This might change x and y return 0; @@ -564,7 +565,7 @@ static int unit_walktoxy(struct block_list *bl, short x, short y, int flag) unit->stop_stepaction(bl); // unit->walktoxy removes any remembered stepaction and resets ud->target_to sc = status->get_sc(bl); - if( sc ) { + if (sc != NULL) { if( sc->data[SC_CONFUSION] || sc->data[SC__CHAOS] ) //Randomize the target position map->random_dir(bl, &ud->to_x, &ud->to_y); if( sc->data[SC_COMBOATTACK] ) |