[General]: Deps Update (#813)
This commit is contained in:
parent
b877dea21c
commit
91d367c1c9
8
deps/premake/fonts.lua
vendored
8
deps/premake/fonts.lua
vendored
@ -1,4 +1,6 @@
|
||||
fonts = {}
|
||||
fonts = {
|
||||
source = path.join(dependencies.basePath, "extra/font"),
|
||||
}
|
||||
|
||||
function fonts.import()
|
||||
fonts.includes()
|
||||
@ -6,7 +8,7 @@ end
|
||||
|
||||
function fonts.includes()
|
||||
includedirs {
|
||||
path.join(dependencies.basePath, "extra/font"),
|
||||
fonts.source,
|
||||
}
|
||||
end
|
||||
|
||||
@ -17,7 +19,7 @@ function fonts.project()
|
||||
fonts.includes()
|
||||
|
||||
files {
|
||||
path.join(dependencies.basePath, "extra/font/*.hpp"),
|
||||
path.join(fonts.source, "Terminus_4.49.1.ttf.hpp"),
|
||||
}
|
||||
|
||||
warnings "Off"
|
||||
|
2
deps/premake/gsl.lua
vendored
2
deps/premake/gsl.lua
vendored
@ -8,7 +8,7 @@ end
|
||||
|
||||
function gsl.includes()
|
||||
includedirs {
|
||||
path.join(gsl.source, "include")
|
||||
path.join(gsl.source, "include"),
|
||||
}
|
||||
end
|
||||
|
||||
|
1
deps/premake/iw4-open-formats.lua
vendored
1
deps/premake/iw4-open-formats.lua
vendored
@ -17,7 +17,6 @@ end
|
||||
function iw4_open_formats.project()
|
||||
project "iw4-open-formats"
|
||||
language "C++"
|
||||
cppdialect "C++latest"
|
||||
|
||||
iw4_open_formats.includes()
|
||||
|
||||
|
4
deps/premake/protobuf.lua
vendored
4
deps/premake/protobuf.lua
vendored
@ -38,10 +38,6 @@ function protobuf.project()
|
||||
}
|
||||
|
||||
rules {"ProtobufCompiler"}
|
||||
|
||||
defines {"_SCL_SECURE_NO_WARNINGS"}
|
||||
|
||||
linkoptions {"-IGNORE:4221"}
|
||||
|
||||
warnings "Off"
|
||||
kind "StaticLib"
|
||||
|
@ -211,7 +211,7 @@ namespace Components
|
||||
|
||||
if (Game::SV_IsTestClient(ent->s.number) == 0)
|
||||
{
|
||||
Game::Scr_Error("^1BotStop: Can only call on a bot!\n");
|
||||
Game::Scr_Error("^1BotStop: Can only call on a bot!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -226,7 +226,7 @@ namespace Components
|
||||
|
||||
if (Game::SV_IsTestClient(ent->s.number) == 0)
|
||||
{
|
||||
Game::Scr_Error("^1BotWeapon: Can only call on a bot!\n");
|
||||
Game::Scr_Error("^1BotWeapon: Can only call on a bot!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -249,7 +249,7 @@ namespace Components
|
||||
|
||||
if (Game::SV_IsTestClient(ent->s.number) == 0)
|
||||
{
|
||||
Game::Scr_Error("^1BotAction: Can only call on a bot!\n");
|
||||
Game::Scr_Error("^1BotAction: Can only call on a bot!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -257,13 +257,13 @@ namespace Components
|
||||
|
||||
if (action == nullptr)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1BotAction: Illegal parameter!\n");
|
||||
Game::Scr_ParamError(0, "^1BotAction: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (action[0] != '+' && action[0] != '-')
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1BotAction: Sign for action must be '+' or '-'.\n");
|
||||
Game::Scr_ParamError(0, "^1BotAction: Sign for action must be '+' or '-'");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -281,7 +281,7 @@ namespace Components
|
||||
return;
|
||||
}
|
||||
|
||||
Game::Scr_ParamError(0, "^1BotAction: Unknown action.\n");
|
||||
Game::Scr_ParamError(0, "^1BotAction: Unknown action");
|
||||
});
|
||||
|
||||
GSC::Script::AddMethod("BotMovement", [](Game::scr_entref_t entref) // Usage: <bot> BotMovement(<int>, <int>);
|
||||
@ -290,7 +290,7 @@ namespace Components
|
||||
|
||||
if (Game::SV_IsTestClient(ent->s.number) == 0)
|
||||
{
|
||||
Game::Scr_Error("^1BotMovement: Can only call on a bot!\n");
|
||||
Game::Scr_Error("^1BotMovement: Can only call on a bot!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -590,7 +590,7 @@ namespace Components
|
||||
{
|
||||
if (Game::Scr_GetNumParam() != 1)
|
||||
{
|
||||
Game::Scr_Error("^1OnPlayerSay: Needs one function pointer!\n");
|
||||
Game::Scr_Error("^1OnPlayerSay: Needs one function pointer!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -16,13 +16,13 @@ namespace Components::GSC
|
||||
|
||||
if (!path)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1FileWrite: filepath is not defined!\n");
|
||||
Game::Scr_ParamError(0, "^1FileWrite: filepath is not defined!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!text || !mode)
|
||||
{
|
||||
Game::Scr_Error("^1FileWrite: Illegal parameters!\n");
|
||||
Game::Scr_Error("^1FileWrite: Illegal parameters!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ namespace Components::GSC
|
||||
|
||||
if (!path)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1FileRead: filepath is not defined!\n");
|
||||
Game::Scr_ParamError(0, "^1FileRead: filepath is not defined!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ namespace Components::GSC
|
||||
|
||||
if (!path)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1FileExists: filepath is not defined!\n");
|
||||
Game::Scr_ParamError(0, "^1FileExists: filepath is not defined!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ namespace Components::GSC
|
||||
|
||||
if (!path)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1FileRemove: filepath is not defined!\n");
|
||||
Game::Scr_ParamError(0, "^1FileRemove: filepath is not defined!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ namespace Components::GSC
|
||||
{
|
||||
if (static_cast<unsigned int>(index) >= Game::scrVmPub->outparamcount)
|
||||
{
|
||||
Game::Scr_ParamError(static_cast<unsigned int>(index), "^1GetCodePosForParam: Index is out of range!\n");
|
||||
Game::Scr_ParamError(static_cast<unsigned int>(index), "^1GetCodePosForParam: Index is out of range!");
|
||||
return "";
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ namespace Components::GSC
|
||||
|
||||
if (value->type != Game::VAR_FUNCTION)
|
||||
{
|
||||
Game::Scr_ParamError(static_cast<unsigned int>(index), "^1GetCodePosForParam: Expects a function as parameter!\n");
|
||||
Game::Scr_ParamError(static_cast<unsigned int>(index), "^1GetCodePosForParam: Expects a function as parameter!");
|
||||
return "";
|
||||
}
|
||||
|
||||
@ -223,7 +223,7 @@ namespace Components::GSC
|
||||
{
|
||||
if (Game::Scr_GetNumParam() != 2)
|
||||
{
|
||||
Game::Scr_Error("^1ReplaceFunc: Needs two parameters!\n");
|
||||
Game::Scr_Error("^1ReplaceFunc: Needs two parameters!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -247,7 +247,7 @@ namespace Components::GSC
|
||||
const auto* str = Game::Scr_GetString(0);
|
||||
if (!str)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1Exec: Illegal parameter!\n");
|
||||
Game::Scr_ParamError(0, "^1Exec: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -262,7 +262,7 @@ namespace Components::GSC
|
||||
const auto* str = Game::Scr_GetString(i);
|
||||
if (!str)
|
||||
{
|
||||
Game::Scr_ParamError(i, "^1PrintConsole: Illegal parameter!\n");
|
||||
Game::Scr_ParamError(i, "^1PrintConsole: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ namespace Components::GSC
|
||||
{
|
||||
if (Game::Scr_GetNumParam() < 3)
|
||||
{
|
||||
Game::Scr_Error("USAGE: tableLookupIStringByRow( filename, rowNum, returnValueColumnNum )\n");
|
||||
Game::Scr_Error("USAGE: tableLookupIStringByRow( filename, rowNum, returnValueColumnNum )");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ namespace Components::GSC
|
||||
|
||||
if (table == nullptr)
|
||||
{
|
||||
Game::Scr_ParamError(0, Utils::String::VA("%s does not exist\n", fileName));
|
||||
Game::Scr_ParamError(0, Utils::String::VA("%s does not exist", fileName));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ namespace Components::GSC
|
||||
|
||||
if (key == nullptr || value == nullptr)
|
||||
{
|
||||
Game::Scr_Error("^1StorageSet: Illegal parameters!\n");
|
||||
Game::Scr_Error("^1StorageSet: Illegal parameters!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -29,13 +29,13 @@ namespace Components::GSC
|
||||
|
||||
if (key == nullptr)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1StorageRemove: Illegal parameter!\n");
|
||||
Game::Scr_ParamError(0, "^1StorageRemove: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Data.contains(key))
|
||||
{
|
||||
Game::Scr_Error(Utils::String::VA("^1StorageRemove: Store does not have key '%s'!\n", key));
|
||||
Game::Scr_Error(Utils::String::VA("^1StorageRemove: Store does not have key '%s'!", key));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -48,13 +48,13 @@ namespace Components::GSC
|
||||
|
||||
if (key == nullptr)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1StorageGet: Illegal parameter!\n");
|
||||
Game::Scr_ParamError(0, "^1StorageGet: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Data.contains(key))
|
||||
{
|
||||
Game::Scr_Error(Utils::String::VA("^1StorageGet: Store does not have key '%s'!\n", key));
|
||||
Game::Scr_Error(Utils::String::VA("^1StorageGet: Store does not have key '%s'!", key));
|
||||
}
|
||||
|
||||
const auto& data = Data.at(key);
|
||||
@ -67,7 +67,7 @@ namespace Components::GSC
|
||||
|
||||
if (key == nullptr)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1StorageHas: Illegal parameter!\n");
|
||||
Game::Scr_ParamError(0, "^1StorageHas: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ namespace Components::GSC
|
||||
{
|
||||
if (Data.empty())
|
||||
{
|
||||
Game::Scr_Error("^1StorageDump: ScriptStorage is empty!\n");
|
||||
Game::Scr_Error("^1StorageDump: ScriptStorage is empty!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,25 @@ namespace Components::GSC
|
||||
}
|
||||
});
|
||||
|
||||
Script::AddFunction("GetChar", []
|
||||
{
|
||||
const auto* str = Game::Scr_GetString(0);
|
||||
const auto index = Game::Scr_GetInt(1);
|
||||
|
||||
if (!str)
|
||||
{
|
||||
Game::Scr_Error("^1GetChar: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (static_cast<std::size_t>(index) >= std::strlen(str))
|
||||
{
|
||||
Game::Scr_Error("GetChar: char index is out of bounds");
|
||||
}
|
||||
|
||||
Game::Scr_AddInt(str[index]);
|
||||
});
|
||||
|
||||
// Func present on IW5
|
||||
Script::AddFunction("StrICmp", [] // gsc: StrICmp(<string>, <string>)
|
||||
{
|
||||
@ -70,7 +89,7 @@ namespace Components::GSC
|
||||
|
||||
if (!str || !suffix)
|
||||
{
|
||||
Game::Scr_Error("^1IsEndStr: Illegal parameters!\n");
|
||||
Game::Scr_Error("^1IsEndStr: Illegal parameters!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ namespace Components::GSC
|
||||
|
||||
if (name == nullptr)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1SetName: Illegal parameter!\n");
|
||||
Game::Scr_ParamError(0, "^1SetName: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ namespace Components::GSC
|
||||
|
||||
if (clanName == nullptr)
|
||||
{
|
||||
Game::Scr_ParamError(0, "^1SetClanTag: Illegal parameter!\n");
|
||||
Game::Scr_ParamError(0, "^1SetClanTag: Illegal parameter!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -340,7 +340,7 @@ namespace Components
|
||||
Network::OnClientPacket("getInfo", [](const Network::Address& address, [[maybe_unused]] const std::string& data)
|
||||
{
|
||||
auto botCount = 0;
|
||||
auto clientCount = 0;
|
||||
auto effectiveClientCount = 0;
|
||||
auto maxClientCount = *Game::svs_clientCount;
|
||||
const auto securityLevel = Dvar::Var("sv_securityLevel").get<int>();
|
||||
const auto* password = *Game::g_password ? (*Game::g_password)->current.string : "";
|
||||
@ -360,14 +360,14 @@ namespace Components
|
||||
}
|
||||
else
|
||||
{
|
||||
++clientCount;
|
||||
++effectiveClientCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
maxClientCount = *Game::party_maxplayers ? (*Game::party_maxplayers)->current.integer : 18;
|
||||
clientCount = Game::PartyHost_CountMembers(Game::g_lobbyData);
|
||||
effectiveClientCount = Game::PartyHost_CountMembers(Game::g_lobbyData);
|
||||
}
|
||||
|
||||
Utils::InfoString info;
|
||||
@ -377,7 +377,7 @@ namespace Components
|
||||
info.set("gametype", (*Game::sv_gametype)->current.string);
|
||||
info.set("fs_game", (*Game::fs_gameDirVar)->current.string);
|
||||
info.set("xuid", Utils::String::VA("%llX", Steam::SteamUser()->GetSteamID().bits));
|
||||
info.set("clients", std::to_string(clientCount));
|
||||
info.set("clients", std::to_string(effectiveClientCount));
|
||||
info.set("bots", std::to_string(botCount));
|
||||
info.set("sv_maxclients", std::to_string(maxClientCount));
|
||||
info.set("protocol", std::to_string(PROTOCOL));
|
||||
|
@ -104,7 +104,7 @@ namespace Components
|
||||
const auto iNumParms = Game::Scr_GetNumParam();
|
||||
if (iNumParms != 2)
|
||||
{
|
||||
Game::Scr_Error(Utils::String::VA("GetStat: takes 2 arguments, got %u.\n", iNumParms));
|
||||
Game::Scr_Error(Utils::String::VA("GetStat: takes 2 arguments, got %u.", iNumParms));
|
||||
}
|
||||
|
||||
const auto index = Game::Scr_GetInt(0);
|
||||
|
Loading…
Reference in New Issue
Block a user