diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index ce75e0446..113d82fbf 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4859,13 +4859,11 @@ bool battle_check_range(struct block_list *src, struct block_list *bl, int range return false; #ifndef CIRCULAR_AREA - if( src->type == BL_PC ) - { // Range for players' attacks and skills should always have a circular check. [Inkfish] + if( src->type == BL_PC ) { // Range for players' attacks and skills should always have a circular check. [Angezerus] int dx = src->x - bl->x, dy = src->y - bl->y; - if( !check_distance(dx*dx + dy*dy, 0, range*range+(dx&&dy?1:0)) ) + if( !check_distance(dx, dy, range) ) return false; - } - else + } else #endif if( !check_distance_bl(src, bl, range) ) return false; |