mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Squashed commit of the following:
commit 906dff5aa4289ddda61be508b6b20320f5cfb7bf Author: IcePixelx <41352111+PixieCore@users.noreply.github.com> Date: Fri Aug 20 12:37:09 2021 +0200 Update r5net.cpp commit 4f463eb446f5ebf561d42db0f6cb2bed8a43e517 Author: IcePixelx <41352111+PixieCore@users.noreply.github.com> Date: Fri Aug 20 12:26:32 2021 +0200 Fixed error message parsing in r5net. commit 64aa6e7f97ea9461ed5d5795901e427732fb62bd Author: IcePixelx <41352111+PixieCore@users.noreply.github.com> Date: Thu Aug 19 14:48:31 2021 +0200 Fixed prints. commit bb4b4d76366eccd7687bdfe970e50274320c6622 Author: IcePixelx <41352111+PixieCore@users.noreply.github.com> Date: Thu Aug 19 14:46:22 2021 +0200 Added shortcut with launch params. commit 962afa215e97c75e80cc6644fb8ad64d110dfb60 Author: IcePixelx <41352111+PixieCore@users.noreply.github.com> Date: Thu Aug 19 14:35:30 2021 +0200 Wrong return. commit 0e171fca6a4662225f1da32e1b12e5450b338c1a Author: IcePixelx <41352111+PixieCore@users.noreply.github.com> Date: Thu Aug 19 14:32:52 2021 +0200 Changes in description. * Added icon to launcher.exe * Launcher.exe gets remnamed to Run R5 Reloaded.exe in launcher release compilation configuration. * Extended argument buffer for starting the game in launcher.exe. * Added exception printing if in the custom ConVars an invalid value gets passed. commit 70b4c02a9a7b0978d64a1ab7c1db3c76f695eda8 Author: IcePixelx <41352111+PixieCore@users.noreply.github.com> Date: Thu Aug 19 01:27:44 2021 +0200 Read description for all changes. * Added ability to register custom ConVar. * Added 2 custom ConVars to open the CGameConsole and CCompanion Windows. * Changed ResolveRelativeAddress. * Added Config System for the Gui. * Added ImGui::Hotkey. * Added the ability to change 2 hotkeys for opening the window for CGameConsole and CCompanion. * Changed pattern for Squirrel_CompilerError to use a String. * Added IMemAlloc::AllocWrapper to patterns.h commit 06127dee1d901d555b8a6b2b4592a12273454d64 Author: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Wed Aug 18 23:17:51 2021 +0100 prevent squirrel compiler errors from killing game process (#43) commit a3025e76de885558da4aef07077cbfee4551ed58 Author: Marcii0 <58266292+Marcii0@users.noreply.github.com> Date: Thu Aug 19 00:17:18 2021 +0200 Changed map-select drop down menu, now it displays 'Map Name + Season' instead of file-name. (#41) * Host Server shows normal map names * Changed a few stuff... * redid some stuff that isn't crucial * Update CCompanion.cpp * Update CCompanion.cpp * Updated mapname displaying. * Moved "ServerMap" as a static object into CCompanion::HostServerSection(). Co-authored-by: IcePixelx <41352111+PixieCore@users.noreply.github.com> commit bbd58bba7567f463e2581559df522d67f3d0b026 Author: IcePixelx <41352111+PixieCore@users.noreply.github.com> Date: Tue Aug 17 23:18:35 2021 +0200 Fixed potential crashes in r5net and added debug prints. * Potential crashes were when in certain post functions the returned status wasn't 200. commit 3558eb9c487d3297ab28451053347c0afae7f15f Author: IcePixelx <41352111+PixieCore@users.noreply.github.com> Date: Tue Aug 17 23:11:29 2021 +0200 Removed un-used define in hooks.h commit 54cdb2fb61b2c729e6b0e99e0cd5c1ede3cc5229 Author: IcePixelx <41352111+PixieCore@users.noreply.github.com> Date: Tue Aug 17 23:04:53 2021 +0200 Updated IsFlagSet hooks. * Cleaned up code to properly mask off Dev and Cheat flags. * Added separate define from _DEBUG so you can define it in release builds for people without C++ Debug Restributeables. commit 7e7717ff68b5e177e58dd3e7989f35740cdc9236 Author: IcePixelx <41352111+PixieCore@users.noreply.github.com> Date: Tue Aug 17 23:03:21 2021 +0200 Added new patterns to the print function. commit 768f2341f19d1e2e9b8fd05d1d667f46ab21dc71 Author: IcePixelx <41352111+PixieCore@users.noreply.github.com> Date: Tue Aug 17 23:02:14 2021 +0200 Added separate function to resolve relative addresses in address.h
This commit is contained in:
parent
7bb4fd6313
commit
6af81622b7
@ -51,9 +51,25 @@ std::vector<ServerListing> R5Net::Client::GetServersList(std::string& outMessage
|
||||
else
|
||||
{
|
||||
if (res)
|
||||
{
|
||||
if (!res->body.empty())
|
||||
{
|
||||
nlohmann::json resBody = nlohmann::json::parse(res->body);
|
||||
|
||||
if (resBody["err"].is_string())
|
||||
outMessage = resBody["err"].get<std::string>();
|
||||
else
|
||||
outMessage = std::string("Failed to reach comp-server ") + std::to_string(res->status);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
outMessage = std::string("Failed to reach comp-server ") + std::to_string(res->status);
|
||||
else
|
||||
outMessage = "Failed to reach comp-server unknown error code.";
|
||||
return list;
|
||||
}
|
||||
|
||||
outMessage = "failed to reach comp-server unknown error code.";
|
||||
return list;
|
||||
}
|
||||
|
||||
return list;
|
||||
@ -90,7 +106,7 @@ bool R5Net::Client::PostServerHost(std::string& outMessage, std::string& outToke
|
||||
if (resBody["token"].is_string())
|
||||
outToken = resBody["token"].get<std::string>();
|
||||
else
|
||||
outToken = "";
|
||||
outToken = std::string();
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -107,12 +123,27 @@ bool R5Net::Client::PostServerHost(std::string& outMessage, std::string& outToke
|
||||
else
|
||||
{
|
||||
if (res)
|
||||
{
|
||||
if (!res->body.empty())
|
||||
{
|
||||
nlohmann::json resBody = nlohmann::json::parse(res->body);
|
||||
|
||||
if (resBody["err"].is_string())
|
||||
outMessage = resBody["err"].get<std::string>();
|
||||
else
|
||||
outMessage = std::string("Failed to reach comp-server ") + std::to_string(res->status);
|
||||
|
||||
outToken = std::string();
|
||||
return false;
|
||||
}
|
||||
|
||||
outToken = std::string();
|
||||
outMessage = std::string("Failed to reach comp-server ") + std::to_string(res->status);
|
||||
else
|
||||
outMessage = "Failed to reach comp-server unknown error code.";
|
||||
|
||||
outToken = "";
|
||||
return false;
|
||||
}
|
||||
|
||||
outToken = std::string();
|
||||
outMessage = "failed to reach comp-server unknown error code.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -175,7 +206,7 @@ bool R5Net::Client::GetServerByToken(ServerListing& outServer, std::string& outM
|
||||
if (resBody["err"].is_string())
|
||||
outMessage = resBody["err"].get<std::string>();
|
||||
else
|
||||
outMessage = "Failed to reach comp-server unknown error code.";
|
||||
outMessage = std::string("Failed to reach comp-server ") + std::to_string(res->status);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user