diff options
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 221c2c2de..0474d82a0 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3430,6 +3430,15 @@ bool battle_check_range(struct block_list *src, struct block_list *bl, int range if( src->m != bl->m ) return false; +#ifndef CIRCULAR_AREA + if( src->type == BL_PC ) + { // Range for players' attacks and skills should always have a circular check. [Inkfish] + 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)) ) + return false; + } + else +#endif if( !check_distance_bl(src, bl, range) ) return false; |