p2p.json can now be changed from config folder

This commit is contained in:
Yousef Khadadeh 2025-10-27 20:19:47 +03:00
parent 011f8ba0b4
commit 6ce16849df
6 changed files with 83 additions and 19 deletions

View file

@ -36,7 +36,7 @@ World::World(MainProgram& initMain, OpenWorldInfo& worldInfo):
netSource = worldInfo.netSource;
if(worldInfo.conType == CONNECTIONTYPE_CLIENT || worldInfo.conType == CONNECTIONTYPE_SERVER)
NetLibrary::init();
main.init_net_library();
drawData.rMan = &rMan;
drawData.main = &main;
@ -254,7 +254,7 @@ void World::set_name(const std::string& n) {
void World::start_hosting(const std::string& initNetSource, const std::string& serverLocalID) {
if(conType != CONNECTIONTYPE_LOCAL)
return;
NetLibrary::init();
main.init_net_library();
con.init_local_p2p(*this, serverLocalID);
drawProg.init_client_callbacks();
rMan.init_client_callbacks();