Cleaned up map data storage (#3347)

Follow up to a942853.
Fixes #3336.
Moved map_data storage to std::map container.
Created map_getmapdata to obtain pointer to map_data.
Got rid of MAX_MAP_PER_SERVER define.
Resolved deletion of instances causing other instances to lose their intended map ID.
Refactored warp suggestions

Thanks to @teededung, @anacondaqq, @cydh and @Lemongrass3110!
This commit is contained in:
Aleos
2018-07-25 19:06:59 -04:00
committed by Lemongrass3110
parent 62ac5be447
commit 584fcac43a
26 changed files with 916 additions and 741 deletions

View File

@@ -676,7 +676,7 @@ int chclif_parse_maplogin(int fd){
map_server[i].ip = ntohl(RFIFOL(fd,54));
map_server[i].port = ntohs(RFIFOW(fd,58));
map_server[i].users = 0;
memset(map_server[i].map, 0, sizeof(map_server[i].map));
map_server[i].map = {};
session[fd]->func_parse = chmapif_parse;
session[fd]->flag.server = 1;
realloc_fifo(fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);