diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-11-28 04:18:48 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-11-28 04:18:48 +0000 |
commit | 06e7213b8216fe6650c71aa9038b35c3b6f15d73 (patch) | |
tree | ac89733d3ce2c251c82a497f146afaa7cd98295a /src/map | |
parent | 1f3ee9acb68d9fc7a139ae4d8957bc4581a4c7a4 (diff) | |
download | hercules-06e7213b8216fe6650c71aa9038b35c3b6f15d73.tar.gz hercules-06e7213b8216fe6650c71aa9038b35c3b6f15d73.tar.bz2 hercules-06e7213b8216fe6650c71aa9038b35c3b6f15d73.tar.xz hercules-06e7213b8216fe6650c71aa9038b35c3b6f15d73.zip |
- Now when a player's "attack once" request fails due to range, the client is told to move to the target to attack it. This sort of fixes the problem of the client SPAMMING the server with attack requests from afar without even approaching the icewall x_X
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9340 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/unit.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 0d5fb5b71..9ee07430a 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1323,12 +1323,10 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t if(!check_distance_bl(src,target,range) ) { //Chase if required. - if(ud->state.attack_continue) { - if(sd) - clif_movetoattack(sd,target); - else - unit_walktobl(src,target,ud->chaserange,ud->state.walk_easy|2); - } + if(sd) + clif_movetoattack(sd,target); + else if(ud->state.attack_continue) + unit_walktobl(src,target,ud->chaserange,ud->state.walk_easy|2); return 1; } if(!battle_check_range(src,target,range)) { |