summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-27 15:07:55 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-27 15:07:55 +0000
commit344be8d138d359fd0be0ee72820a7982a9a8d39f (patch)
tree28b8a495326928bdd81c03fbb29f3863c21c3ae7 /src/map/mob.c
parentd5daeaf65b0892f5fd6dfc8cce13cc131d434b80 (diff)
downloadhercules-344be8d138d359fd0be0ee72820a7982a9a8d39f.tar.gz
hercules-344be8d138d359fd0be0ee72820a7982a9a8d39f.tar.bz2
hercules-344be8d138d359fd0be0ee72820a7982a9a8d39f.tar.xz
hercules-344be8d138d359fd0be0ee72820a7982a9a8d39f.zip
- 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
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 1a0d5c38b..da0e28ea5 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -619,6 +619,11 @@ int mob_setdelayspawn(struct mob_data *md)
return 0;
}
+static int mob_count_sub(struct block_list *bl,va_list ap)
+{
+ return 1;
+}
+
/*==========================================
* Mob spawning. Initialization is also variously here.
*------------------------------------------
@@ -655,6 +660,11 @@ int mob_spawn (struct mob_data *md)
add_timer(tick+5000,mob_delayspawn,md->bl.id,0);
return 1;
}
+ } else if (battle_config.no_spawn_on_player>99 &&
+ map_foreachinrange(mob_count_sub, &md->bl, AREA_SIZE, BL_PC))
+ { //retry again later (players on sight)
+ add_timer(tick+5000,mob_delayspawn,md->bl.id,0);
+ return 1;
}
}
malloc_set(&md->state, 0, sizeof(md->state));