summaryrefslogtreecommitdiff
path: root/src/map/map.cpp
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-11-09 13:27:21 -0500
committerGitHub <noreply@github.com>2016-11-09 13:27:21 -0500
commit4a69f1b47d4bd74b988b4d4fe66fd43a26aae123 (patch)
tree521ccf997f7ddf60cf98a84b79a68669dc8c9c4b /src/map/map.cpp
parentf9df1a84b4486eefc65fb91287c2c399531e5b37 (diff)
downloadtmwa-4a69f1b47d4bd74b988b4d4fe66fd43a26aae123.tar.gz
tmwa-4a69f1b47d4bd74b988b4d4fe66fd43a26aae123.tar.bz2
tmwa-4a69f1b47d4bd74b988b4d4fe66fd43a26aae123.tar.xz
tmwa-4a69f1b47d4bd74b988b4d4fe66fd43a26aae123.zip
Decrease the map npc counter when a npc is deleted
Diffstat (limited to 'src/map/map.cpp')
-rw-r--r--src/map/map.cpp3
1 files changed, 3 insertions, 0 deletions
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<block_list> bl)
return 0;
}
+ if (bl->bl_type == BL::NPC)
+ bl->bl_m->npc_num--;
+
if (bl->bl_type == BL::PC)
bl->bl_m->users--;