mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-04-03 06:16:15 +00:00
Compare commits
2 Commits
v2.6.0
...
fix-resour
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd3622170e | ||
|
|
885061f73d |
@@ -377,8 +377,8 @@ struct ModInfo {
|
|||||||
}
|
}
|
||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
debug(std::string("Failed to receive mod list: ") + e.what());
|
debug(std::string("Failed to receive mod list: ") + e.what());
|
||||||
error("Failed to receive mod list!");
|
warn("Failed to receive new mod list format! This server may be outdated, but everything should still work as expected.");
|
||||||
// TODO: Cry and die
|
return {};
|
||||||
}
|
}
|
||||||
return modInfos;
|
return modInfos;
|
||||||
}
|
}
|
||||||
@@ -511,11 +511,15 @@ void NewSyncResources(SOCKET Sock, const std::string& Mods, const std::vector<Mo
|
|||||||
void SyncResources(SOCKET Sock) {
|
void SyncResources(SOCKET Sock) {
|
||||||
std::string Ret = Auth(Sock);
|
std::string Ret = Auth(Sock);
|
||||||
|
|
||||||
auto ModInfos = ModInfo::ParseModInfosFromPacket(Ret);
|
if (Ret.starts_with("R")) {
|
||||||
|
debug("This server is likely outdated, not trying to parse new mod info format");
|
||||||
|
} else {
|
||||||
|
auto ModInfos = ModInfo::ParseModInfosFromPacket(Ret);
|
||||||
|
|
||||||
if (!ModInfos.empty()) {
|
if (!ModInfos.empty()) {
|
||||||
NewSyncResources(Sock, Ret, ModInfos);
|
NewSyncResources(Sock, Ret, ModInfos);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Ret.empty())
|
if (Ret.empty())
|
||||||
|
|||||||
Reference in New Issue
Block a user