From 0b2fc3888b9d09b397a829db4af3f8d35cdaabb9 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 1 Jul 2013 17:16:53 -0300 Subject: Fixed a dysfunctional piece of code in @reloadscript Special Thanks to mleo1 for providing the debug info. Signed-off-by: shennetsind --- src/map/npc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/map/npc.c b/src/map/npc.c index a71bc36ca..33d0c48f1 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -3783,8 +3783,7 @@ int npc_reload(void) { } mapit->free(iter); - if(battle_config.dynamic_mobs) - {// dynamic check by [random] + if(battle_config.dynamic_mobs) {// dynamic check by [random] for (m = 0; m < iMap->map_num; m++) { for (i = 0; i < MAX_MOB_LIST_PER_MAP; i++) { if (map[m].moblist[i] != NULL) { @@ -3797,9 +3796,9 @@ int npc_reload(void) { map[m].mob_delete_timer = INVALID_TIMER; } } + if (map[m].npc_num > 0) + ShowWarning("npc_reload: %d npcs weren't removed at map %s!\n", map[m].npc_num, map[m].name); } - if (map[m].npc_num > 0) - ShowWarning("npc_reload: %d npcs weren't removed at map %s!\n", map[m].npc_num, map[m].name); } // clear mob spawn lookup index -- cgit v1.2.3-60-g2f50