From 344be8d138d359fd0be0ee72820a7982a9a8d39f Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 27 Sep 2006 15:07:55 +0000 Subject: - Merged some splash changes from stable. Sharp-Shooting will now display a skill animation. - The no_spawn_on_player setting will now also work for static mobs, but only if the setting is set to 100 or higher. - Some small cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8887 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/map.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/map/map.c') diff --git a/src/map/map.c b/src/map/map.c index c57902f32..e7e2ad7b7 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1072,7 +1072,7 @@ int map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int y // S ////////////////////////////////////////////////////////////// // Methodology: -// My trigonometrics and math is a little rusty... so the approach I am writing +// My trigonometrics and math are a little rusty... so the approach I am writing // here is basicly do a double for to check for all targets in the square that // contains the initial and final positions (area range increased to match the // radius given), then for each object to test, calculate the distance to the @@ -1082,9 +1082,10 @@ int map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int y // http://astronomy.swin.edu.au/~pbourke/geometry/pointline/ // (they have a link to a C implementation, too) // This approach is a lot like #2 commented on this function, which I have no -// idea why it was commented. I won't use doubles/floats, but pure int math for speed purposes -// The range considered is always the same no matter how close/far the target is because that's -// how SharpShooting works currently in kRO. +// idea why it was commented. I won't use doubles/floats, but pure int math for +// speed purposes. The range considered is always the same no matter how +// close/far the target is because that's how SharpShooting works currently in +// kRO. //Generic map_foreach* variables. va_list ap; @@ -1218,7 +1219,8 @@ int map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int y map_freeblock_lock(); for(i=blockcount;iprev) //This check is done in case some object gets killed due to further skill processing. + returnCount += func(bl_list[i],ap); map_freeblock_unlock(); -- cgit v1.2.3-70-g09d2