summaryrefslogtreecommitdiff
path: root/src/map/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/map.cpp')
-rw-r--r--src/map/map.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/map.cpp b/src/map/map.cpp
index e7b0da8..3538a59 100644
--- a/src/map/map.cpp
+++ b/src/map/map.cpp
@@ -1009,9 +1009,12 @@ dumb_ptr<block_list> map_id2bl(BlockId id)
int map_addnpc(Borrowed<map_local> m, dumb_ptr<npc_data> nd)
{
int i;
- for (i = 0; i < m->npc_num && i < MAX_NPC_PER_MAP; i++)
- if (m->npc[i] == nullptr)
+ for (i = 0; i < m->npc_num && i < MAX_NPC_PER_MAP; i++) {
+ if (m->npc[i] == nullptr) {
+ PRINTF(">>>>>> reusing npc %i\n"_fmt, i);
break;
+ }
+ }
if (i == MAX_NPC_PER_MAP)
{
if (battle_config.error_log)
@@ -1020,6 +1023,7 @@ int map_addnpc(Borrowed<map_local> m, dumb_ptr<npc_data> nd)
}
if (i == m->npc_num)
{
+ PRINTF(">>>>>> using new npc %i\n"_fmt, i);
m->npc_num++;
}