switch to vcpkg+cmake, add debian build to workflows

using lionkor's template (MIT licensed)

This is a combination of 64 commits.
This commit is contained in:
Lion Kortlepel
2023-12-04 15:03:23 +01:00
parent 103d2dc030
commit a6eb2f7bfe
54 changed files with 881 additions and 757 deletions

View File

@@ -382,23 +382,13 @@ void TServer::Apply(TClient& c, int VID, const std::string& pckt) {
std::string VD = c.GetCarData(VID);
if (VD.empty()) {
beammp_error("Tried to apply change to vehicle that does not exist");
auto Lock = Sentry.CreateExclusiveContext();
Sentry.SetContext("vehicle-change",
{ { "packet", Packet },
{ "vehicle-id", std::to_string(VID) },
{ "client-car-count", std::to_string(c.GetCarCount()) } });
Sentry.LogError("attempt to apply change to nonexistent vehicle", _file_basename, _line);
return;
}
std::string Header = VD.substr(0, VD.find('{'));
FoundPos = VD.find('{');
if (FoundPos == std::string::npos) {
auto Lock = Sentry.CreateExclusiveContext();
Sentry.SetContext("vehicle-change-packet",
{ { "packet", VD } });
Sentry.LogError("malformed packet", _file_basename, _line);
return;
return;
}
VD = VD.substr(FoundPos);
rapidjson::Document Veh, Pack;