forked from metin2/server
Eliminated hardcoded allowed map limit, added and increased the limit in length.h
This commit is contained in:
@ -172,6 +172,12 @@ void map_allow_add(int index)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (s_set_map_allows.size() >= MAP_ALLOW_MAX_LEN)
|
||||
{
|
||||
fprintf(stdout, "Fatal error: maximum allowed maps reached!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
fprintf(stdout, "MAP ALLOW %d\n", index);
|
||||
s_set_map_allows.insert(index);
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ void CLIENT_DESC::SetPhase(int iPhase)
|
||||
p.wListenPort = mother_port;
|
||||
p.wP2PPort = p2p_port;
|
||||
p.bAuthServer = false;
|
||||
map_allow_copy(p.alMaps, 32);
|
||||
map_allow_copy(p.alMaps, MAP_ALLOW_MAX_LEN);
|
||||
|
||||
const DESC_MANAGER::DESC_SET & c_set = DESC_MANAGER::instance().GetClientSet();
|
||||
DESC_MANAGER::DESC_SET::const_iterator it;
|
||||
|
@ -1312,7 +1312,7 @@ void CInputDB::MapLocations(const char * c_pData)
|
||||
|
||||
while (bCount--)
|
||||
{
|
||||
for (int i = 0; i < 32; ++i)
|
||||
for (int i = 0; i < MAP_ALLOW_MAX_LEN; ++i)
|
||||
{
|
||||
if (0 == pLoc->alMaps[i])
|
||||
break;
|
||||
|
Reference in New Issue
Block a user