Cleaned up map data checks (#3405)

* Fixes #3398 and fixes #3402.
* Sped up pc_isUseitem, pc_setpos, and pc_dead map data checks.
Thanks to @uddevil!
This commit is contained in:
Aleos
2018-08-27 18:03:38 -04:00
committed by GitHub
parent a5af358bf7
commit bde33e762c
3 changed files with 34 additions and 31 deletions

View File

@@ -2760,7 +2760,10 @@ int map_delinstancemap(int m)
aFree(mapdata->block);
aFree(mapdata->block_mob);
map_free_questinfo(m);
mapdata->flag.clear();
mapdata->drop_list.clear();
mapdata->damage_adjust = {};
mapdata->skill_damage.clear();
mapindex_removemap( mapdata->index );
map_removemapdb(mapdata);
@@ -3546,6 +3549,7 @@ void map_flags_init(void){
struct map_data *mapdata = &map[i];
union u_mapflag_args args = {};
mapdata->flag.reserve(MF_MAX); // Reserve the bucket size
args.flag_val = 100;
// additional mapflag data