diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-04-11 11:21:48 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-04-11 11:21:48 +0000 |
commit | 39d366440ac8f14fb9573345395ba5517dbeb25c (patch) | |
tree | 68828156c2fff60e2c03b674184603e124ff6142 /src/map/mob.c | |
parent | 8caedfe81e0f03423fe46f05274b3590e2bb9416 (diff) | |
download | hercules-39d366440ac8f14fb9573345395ba5517dbeb25c.tar.gz hercules-39d366440ac8f14fb9573345395ba5517dbeb25c.tar.bz2 hercules-39d366440ac8f14fb9573345395ba5517dbeb25c.tar.xz hercules-39d366440ac8f14fb9573345395ba5517dbeb25c.zip |
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
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |