From 4a69f1b47d4bd74b988b4d4fe66fd43a26aae123 Mon Sep 17 00:00:00 2001 From: mekolat Date: Wed, 9 Nov 2016 13:27:21 -0500 Subject: Decrease the map npc counter when a npc is deleted --- src/map/map.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/map/map.cpp b/src/map/map.cpp index e7b0da8..08d5ceb 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -208,6 +208,9 @@ int map_delblock(dumb_ptr bl) return 0; } + if (bl->bl_type == BL::NPC) + bl->bl_m->npc_num--; + if (bl->bl_type == BL::PC) bl->bl_m->users--; -- cgit v1.2.3-60-g2f50