diff options
author | mekolat <mekolat@users.noreply.github.com> | 2016-11-09 13:27:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-09 13:27:21 -0500 |
commit | 4a69f1b47d4bd74b988b4d4fe66fd43a26aae123 (patch) | |
tree | 521ccf997f7ddf60cf98a84b79a68669dc8c9c4b /src/map/map.cpp | |
parent | f9df1a84b4486eefc65fb91287c2c399531e5b37 (diff) | |
download | tmwa-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.cpp | 3 |
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--; |