From 39d366440ac8f14fb9573345395ba5517dbeb25c Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 11 Apr 2012 11:21:48 +0000 Subject: Minor performance improvement. server no longer wastes processing time creating the awfully long spawn packet when there is nobody in the map it is being spawned in (for mobs & npcs). this also makes server boot faster. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15856 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/mob.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/map/mob.c') diff --git a/src/map/mob.c b/src/map/mob.c index ac7bbb380..4cf13e4cc 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -915,7 +915,8 @@ int mob_spawn (struct mob_data *md) md->sc.option = md->db->option; map_addblock(&md->bl); - clif_spawn(&md->bl); + if( map[md->bl.m].users ) + clif_spawn(&md->bl); skill_unit_move(&md->bl,tick,1); mobskill_use(md, tick, MSC_SPAWN); return 0; -- cgit v1.2.3-60-g2f50