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/mob.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/map/mob.c') 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)); -- cgit v1.2.3-60-g2f50