summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
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));