From 809ea4d50651e41fdc72774de62c27abd6116e94 Mon Sep 17 00:00:00 2001 From: Edo Date: Wed, 26 Apr 2023 23:51:38 +0100 Subject: [PATCH 01/15] [CHANGELOG]: Forgot this (#984) --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5537e31c..0c9138b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. ## r4226 - 2023-04-26 +### Changed + - Chat system will go back to using `SV_CMD_CAN_IGNORE` commands (#972) ### Fixed From 280a72b36b6934440a3266ff455e5496edfe56f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Apr 2023 17:57:45 +0000 Subject: [PATCH 02/15] Bump deps/protobuf from `53a1c5c` to `5a3dac8` Bumps [deps/protobuf](https://github.com/google/protobuf) from `53a1c5c` to `5a3dac8`. - [Release notes](https://github.com/google/protobuf/releases) - [Commits](https://github.com/google/protobuf/compare/53a1c5c1d8b61984899b6877e491e5117ad486ba...5a3dac894157bf3618b2c906a8b9073b4cad62b6) --- updated-dependencies: - dependency-name: deps/protobuf dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- deps/protobuf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/protobuf b/deps/protobuf index 53a1c5c1..5a3dac89 160000 --- a/deps/protobuf +++ b/deps/protobuf @@ -1 +1 @@ -Subproject commit 53a1c5c1d8b61984899b6877e491e5117ad486ba +Subproject commit 5a3dac894157bf3618b2c906a8b9073b4cad62b6 From 97cc02b6e1a0ea8124d19f675407d4fe2c0ef069 Mon Sep 17 00:00:00 2001 From: Edo Date: Fri, 28 Apr 2023 22:08:12 +0100 Subject: [PATCH 03/15] [ClanTags]: Update event (#986) --- src/Components/Modules/ClanTags.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Modules/ClanTags.cpp b/src/Components/Modules/ClanTags.cpp index 40233a4c..07aa4ab8 100644 --- a/src/Components/Modules/ClanTags.cpp +++ b/src/Components/Modules/ClanTags.cpp @@ -233,7 +233,7 @@ namespace Components ClanTags::ClanTags() { - Events::OnClientInit([] + Events::OnDvarInit([] { ClanName = Game::Dvar_RegisterString("clanName", "", Game::DVAR_ARCHIVE, "Your clan abbreviation"); }); From de52a67277ebd03f85aefa19dd61314ef966902b Mon Sep 17 00:00:00 2001 From: Edo Date: Fri, 28 Apr 2023 22:29:19 +0100 Subject: [PATCH 04/15] [CardTitles]: Code Style Update (#987) --- src/Components/Modules/CardTitles.cpp | 10 ++++------ src/Components/Modules/ClanTags.cpp | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Components/Modules/CardTitles.cpp b/src/Components/Modules/CardTitles.cpp index b7c0d6d0..d3e44442 100644 --- a/src/Components/Modules/CardTitles.cpp +++ b/src/Components/Modules/CardTitles.cpp @@ -137,14 +137,13 @@ namespace Components pop eax cmp eax, 0 - jz OriginalTitle + jz originalTitle pop ecx - mov ecx, DWORD ptr[esi + 4] + mov ecx, dword ptr[esi + 4] retn - OriginalTitle: - + originalTitle: mov eax, [esi + 50h] cmp eax, 3 @@ -173,8 +172,7 @@ namespace Components list.append(std::format("\\{}\\{}", i, playerTitle)); } - const auto* command = Utils::String::Format("{:c} customTitles \"{}\"", 21, list); - Game::SV_GameSendServerCommand(-1, Game::SV_CMD_CAN_IGNORE, command); + Game::SV_GameSendServerCommand(-1, Game::SV_CMD_CAN_IGNORE, Utils::String::Format("{:c} customTitles \"{}\"", 21, list)); } void CardTitles::ParseCustomTitles(const char* msg) diff --git a/src/Components/Modules/ClanTags.cpp b/src/Components/Modules/ClanTags.cpp index 07aa4ab8..2dd4a956 100644 --- a/src/Components/Modules/ClanTags.cpp +++ b/src/Components/Modules/ClanTags.cpp @@ -86,7 +86,7 @@ namespace Components auto curChar = CL_FilterChar(static_cast(currentName[i])); if (curChar > 0) { - *saneName++ = (curChar & 0xFF); + *saneName++ = curChar & 0xFF; } } From c1809dbf7df78b3dceb66749438b06e075d4d32c Mon Sep 17 00:00:00 2001 From: Edo Date: Sat, 29 Apr 2023 10:45:15 +0100 Subject: [PATCH 05/15] [General]: Cleanup logger (#988) --- src/Components/Modules/Chat.cpp | 26 +++++++++++++------------- src/Components/Modules/Dedicated.cpp | 2 +- src/Components/Modules/Stats.cpp | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Components/Modules/Chat.cpp b/src/Components/Modules/Chat.cpp index 2e0c476f..883e3754 100644 --- a/src/Components/Modules/Chat.cpp +++ b/src/Components/Modules/Chat.cpp @@ -351,7 +351,7 @@ namespace Components } catch (const std::exception& ex) { - Logger::PrintError(Game::CON_CHANNEL_ERROR, "Json Parse Error: {}\n", ex.what()); + Logger::PrintError(Game::CON_CHANNEL_ERROR, "JSON Parse Error: {}\n", ex.what()); return; } @@ -386,7 +386,7 @@ namespace Components { if (!Dedicated::IsRunning()) { - Logger::Print(Game::CON_CHANNEL_SERVER, "Server is not running.\n"); + Logger::Print("Server is not running.\n"); return; } @@ -409,7 +409,7 @@ namespace Components { if (!Dedicated::IsRunning()) { - Logger::Print(Game::CON_CHANNEL_SERVER, "Server is not running.\n"); + Logger::Print("Server is not running.\n"); return; } @@ -450,7 +450,7 @@ namespace Components { if (!Dedicated::IsRunning()) { - Logger::Print(Game::CON_CHANNEL_SERVER, "Server is not running.\n"); + Logger::Print("Server is not running.\n"); return; } @@ -462,12 +462,12 @@ namespace Components if (!name.empty()) { Game::SV_GameSendServerCommand(-1, Game::SV_CMD_CAN_IGNORE, Utils::String::Format("{:c} \"{}: {}\"", 0x68, name, message)); - Logger::Print(Game::CON_CHANNEL_SERVER, "{}: {}\n", name, message); + Logger::Print("{}: {}\n", name, message); } else { Game::SV_GameSendServerCommand(-1, Game::SV_CMD_CAN_IGNORE, Utils::String::Format("{:c} \"Console: {}\"", 0x68, message)); - Logger::Print(Game::CON_CHANNEL_SERVER, "Console: {}\n", message); + Logger::Print("Console: {}\n", message); } }); @@ -475,7 +475,7 @@ namespace Components { if (!Dedicated::IsRunning()) { - Logger::Print(Game::CON_CHANNEL_SERVER, "Server is not running.\n"); + Logger::Print("Server is not running.\n"); return; } @@ -490,12 +490,12 @@ namespace Components if (!name.empty()) { Game::SV_GameSendServerCommand(clientNum, Game::SV_CMD_CAN_IGNORE, Utils::String::Format("{:c} \"{}: {}\"", 0x68, name.data(), message)); - Logger::Print(Game::CON_CHANNEL_SERVER, "{} -> {}: {}\n", name, clientNum, message); + Logger::Print("{} -> {}: {}\n", name, clientNum, message); } else { Game::SV_GameSendServerCommand(clientNum, Game::SV_CMD_CAN_IGNORE, Utils::String::Format("{:c} \"Console: {}\"", 0x68, message)); - Logger::Print(Game::CON_CHANNEL_SERVER, "Console -> {}: {}\n", clientNum, message); + Logger::Print("Console -> {}: {}\n", clientNum, message); } }); @@ -503,7 +503,7 @@ namespace Components { if (!Dedicated::IsRunning()) { - Logger::Print(Game::CON_CHANNEL_SERVER, "Server is not running.\n"); + Logger::Print("Server is not running.\n"); return; } @@ -511,14 +511,14 @@ namespace Components const auto message = params->join(1); Game::SV_GameSendServerCommand(-1, Game::SV_CMD_CAN_IGNORE, Utils::String::Format("{:c} \"{}\"", 0x68, message)); - Logger::Print(Game::CON_CHANNEL_SERVER, "Raw: {}\n", message); + Logger::Print("Raw: {}\n", message); }); Command::AddSV("tellraw", [](Command::Params* params) { if (!Dedicated::IsRunning()) { - Logger::Print(Game::CON_CHANNEL_SERVER, "Server is not running.\n"); + Logger::Print("Server is not running.\n"); return; } @@ -529,7 +529,7 @@ namespace Components const auto message = params->join(2); Game::SV_GameSendServerCommand(clientNum, Game::SV_CMD_CAN_IGNORE, Utils::String::Format("{:c} \"{}\"", 0x68, message)); - Logger::Print(Game::CON_CHANNEL_SERVER, "Raw -> {}: {}\n", clientNum, message); + Logger::Print("Raw -> {}: {}\n", clientNum, message); }); sv_sayName = Dvar::Register("sv_sayName", "^7Console", Game::DVAR_NONE, "The alias of the server when broadcasting a chat message"); diff --git a/src/Components/Modules/Dedicated.cpp b/src/Components/Modules/Dedicated.cpp index f0a15590..100a1ab2 100644 --- a/src/Components/Modules/Dedicated.cpp +++ b/src/Components/Modules/Dedicated.cpp @@ -172,7 +172,7 @@ namespace Components Network::Address master(Utils::String::VA("%s:%u", masterServerName, masterPort)); - Logger::Print(Game::CON_CHANNEL_SERVER, "Sending heartbeat to master: {}:{}\n", masterServerName, masterPort); + Logger::Print("Sending heartbeat to master: {}:{}\n", masterServerName, masterPort); Network::SendCommand(master, "heartbeat", "IW4"); } diff --git a/src/Components/Modules/Stats.cpp b/src/Components/Modules/Stats.cpp index 1f424688..b2e8db16 100644 --- a/src/Components/Modules/Stats.cpp +++ b/src/Components/Modules/Stats.cpp @@ -175,7 +175,7 @@ namespace Components { if (params->size() < 2) { - Logger::PrintError(Game::CON_CHANNEL_SERVER, "statget usage: statget \n"); + Logger::Print("statget usage: statget \n"); return; } From ad59acc45743eed6e93ea935e2cfa10aefcf995b Mon Sep 17 00:00:00 2001 From: Edo Date: Sat, 29 Apr 2023 11:11:57 +0100 Subject: [PATCH 06/15] [Chat]: Skip over '/' (#989) --- src/Components/Modules/Bans.cpp | 2 +- src/Components/Modules/Chat.cpp | 8 +-- src/Components/Modules/TextRenderer.cpp | 82 +++++++++++++++---------- 3 files changed, 54 insertions(+), 38 deletions(-) diff --git a/src/Components/Modules/Bans.cpp b/src/Components/Modules/Bans.cpp index b7702656..f25e5bc6 100644 --- a/src/Components/Modules/Bans.cpp +++ b/src/Components/Modules/Bans.cpp @@ -8,7 +8,7 @@ namespace Components // Have only one instance of IW4x read/write the file std::unique_lock Bans::Lock() { - static Utils::NamedMutex mutex{"iw4x-ban-list-lock"}; + static Utils::NamedMutex mutex{ "iw4x-ban-list-lock" }; std::unique_lock lock{mutex}; return lock; } diff --git a/src/Components/Modules/Chat.cpp b/src/Components/Modules/Chat.cpp index 883e3754..4db13e9c 100644 --- a/src/Components/Modules/Chat.cpp +++ b/src/Components/Modules/Chat.cpp @@ -24,7 +24,7 @@ namespace Components // Have only one instance of IW4x read/write the file std::unique_lock Chat::Lock() { - static Utils::NamedMutex mutex{"iw4x-mute-list-lock"}; + static Utils::NamedMutex mutex{ "iw4x-mute-list-lock" }; std::unique_lock lock{mutex}; return lock; } @@ -51,6 +51,7 @@ namespace Components if (text[msgIndex] == '/') { SendChat = false; + ++msgIndex; } if (IsMuted(player)) @@ -65,13 +66,14 @@ namespace Components Game::SV_GameSendServerCommand(player - Game::g_entities, Game::SV_CMD_CAN_IGNORE, Utils::String::VA("%c \"Chat is disabled\"", 0x65)); } - // Message might be empty after the special characters + // Message might be empty after the special characters or '/' if (text[msgIndex] == '\0') { SendChat = false; return text; } + TextRenderer::StripMaterialTextIcons(text, text, std::strlen(text) + 1); Logger::Print("{}: {}\n", Game::svs_clients[player - Game::g_entities].name, (text + msgIndex)); for (const auto& callback : SayCallbacks) @@ -82,8 +84,6 @@ namespace Components } } - TextRenderer::StripMaterialTextIcons(text, text, std::strlen(text) + 1); - Game::Scr_AddEntity(player); Game::Scr_AddString(text + msgIndex); Game::Scr_NotifyLevel(static_cast(Game::SL_GetString("say", 0)), 2); diff --git a/src/Components/Modules/TextRenderer.cpp b/src/Components/Modules/TextRenderer.cpp index dfc6d6f6..9f2b0e2e 100644 --- a/src/Components/Modules/TextRenderer.cpp +++ b/src/Components/Modules/TextRenderer.cpp @@ -940,7 +940,7 @@ namespace Components } const auto materialNameLen = static_cast(*text); - text++; + ++text; for (auto i = 0u; i < materialNameLen; i++) { @@ -954,8 +954,10 @@ namespace Components text += materialNameLen; auto* material = Game::DB_FindXAssetHeader(Game::XAssetType::ASSET_TYPE_MATERIAL, materialName.data()).material; - if (material == nullptr || material->techniqueSet == nullptr || material->techniqueSet->name == nullptr || strcmp(material->techniqueSet->name, "2d") != 0) + if (material == nullptr || material->techniqueSet == nullptr || material->techniqueSet->name == nullptr || std::strcmp(material->techniqueSet->name, "2d") != 0) + { material = Game::DB_FindXAssetHeader(Game::XAssetType::ASSET_TYPE_MATERIAL, "default").material; + } const auto yy = y - (h + yScale * static_cast(font->pixelHeight)) * 0.5f; @@ -1091,7 +1093,7 @@ namespace Components if (renderFlags & Game::TEXT_RENDERFLAG_PADDING) xa += xScale * padding; ++count; - maxLengthRemaining--; + --maxLengthRemaining; continue; } @@ -1111,7 +1113,7 @@ namespace Components if (renderFlags & Game::TEXT_RENDERFLAG_PADDING) xa += xScale * padding; count += (fontIconEnd - curText) + 1; - maxLengthRemaining--; + --maxLengthRemaining; curText = fontIconEnd; continue; } @@ -1222,8 +1224,8 @@ namespace Components if (renderFlags & Game::TEXT_RENDERFLAG_PADDING) xa += xScale * padding; - count++; - maxLengthRemaining--; + ++count; + --maxLengthRemaining; } if (renderFlags & Game::TEXT_RENDERFLAG_CURSOR && count == cursorPos) @@ -1240,10 +1242,14 @@ namespace Components auto maxWidth = 0; if (maxChars <= 0) + { maxChars = std::numeric_limits::max(); + } if (text == nullptr) + { return 0; + } auto count = 0; while (text && *text && count < maxChars) @@ -1259,7 +1265,7 @@ namespace Components { if (*text >= COLOR_FIRST_CHAR && *text <= COLOR_LAST_CHAR) { - text++; + ++text; continue; } @@ -1309,7 +1315,8 @@ namespace Components { maxWidth = lineWidth; } - count++; + + ++count; } } @@ -1328,7 +1335,7 @@ namespace Components if (!in || !out) return; max--; - size_t current = 0; + std::size_t current = 0; while (*in != 0 && current < max) { const char index = *(in + 1); @@ -1345,6 +1352,7 @@ namespace Components ++in; } + *out = '\0'; } @@ -1352,7 +1360,7 @@ namespace Components { char buffer[1024]{}; // 1024 is a lucky number in the engine StripColors(in.data(), buffer, sizeof(buffer)); - return {buffer}; + return std::string{ buffer }; } void TextRenderer::StripMaterialTextIcons(const char* in, char* out, std::size_t max) @@ -1399,6 +1407,7 @@ namespace Components } } + *out = '\0'; } @@ -1406,7 +1415,7 @@ namespace Components { char buffer[1000]{}; // Should be more than enough StripAllTextIcons(in.data(), buffer, sizeof(buffer)); - return {buffer}; + return std::string{ buffer }; } void TextRenderer::StripAllTextIcons(const char* in, char* out, std::size_t max) @@ -1414,7 +1423,7 @@ namespace Components if (!in || !out) return; --max; - size_t current = 0; + std::size_t current = 0; while (*in != 0 && current < max) { if (*in == '^' && (in[1] == '\x01' || in[1] == '\x02')) @@ -1422,18 +1431,25 @@ namespace Components in += 2; if (*in) // width - in++; + { + ++in; + } + if (*in) // height - in++; + { + ++in; + } if (*in) // material name length + material name characters { const auto materialNameLength = *in; - in++; + ++in; for (auto i = 0; i < materialNameLength; i++) { if (*in) - in++; + { + ++in; + } } } @@ -1486,16 +1502,16 @@ namespace Components if (c == '^' && *curText >= COLOR_FIRST_CHAR && *curText <= COLOR_LAST_CHAR && !(cursorPos > count && cursorPos < count + 2)) { - curText++; - count++; + ++curText; + ++count; } else if(c != '\r' && c != '\n') { - len++; + ++len; } - count++; - lenWithInvisibleTail++; + ++count; + ++lenWithInvisibleTail; } return lenWithInvisibleTail; @@ -1524,17 +1540,17 @@ namespace Components { Utils::Hook::Set(0x535629, limit); // DrawText2d Utils::Hook::Set(0x4C1BE4, limit); // SEH_PrintStrlen - Utils::Hook::Set(0x4863DD, limit); // No idea :P - Utils::Hook::Set(0x486429, limit); // No idea :P - Utils::Hook::Set(0x49A5A8, limit); // No idea :P + Utils::Hook::Set(0x4863DD, limit); // No idea + Utils::Hook::Set(0x486429, limit); // No idea + Utils::Hook::Set(0x49A5A8, limit); // No idea Utils::Hook::Set(0x505721, limit); // R_TextWidth - Utils::Hook::Set(0x505801, limit); // No idea :P - Utils::Hook::Set(0x50597F, limit); // No idea :P - Utils::Hook::Set(0x5815DB, limit); // No idea :P - Utils::Hook::Set(0x592ED0, limit); // No idea :P - Utils::Hook::Set(0x5A2E2E, limit); // No idea :P + Utils::Hook::Set(0x505801, limit); // No idea + Utils::Hook::Set(0x50597F, limit); // No idea + Utils::Hook::Set(0x5815DB, limit); // No idea + Utils::Hook::Set(0x592ED0, limit); // No idea + Utils::Hook::Set(0x5A2E2E, limit); // No idea - Utils::Hook::Set(0x5A2733, static_cast(ColorIndexForChar(limit))); // No idea :P + Utils::Hook::Set(0x5A2733, static_cast(ColorIndexForChar(limit))); // No idea } // Patches team overhead normally @@ -1573,8 +1589,8 @@ namespace Components { __asm { - push[esp + 8h] - push[esp + 8h] + push [esp + 8h] + push [esp + 8h] call TextRenderer::Dvar_GetUnpackedColorByName add esp, 8h @@ -1654,7 +1670,7 @@ namespace Components fontIconLookup.emplace(std::make_pair(entry.iconName, entry)); } - std::sort(fontIconList.begin(), fontIconList.end(), [](const FontIconTableEntry& a, const FontIconTableEntry& b) + std::ranges::sort(fontIconList, [](const FontIconTableEntry& a, const FontIconTableEntry& b) -> bool { return a.iconName < b.iconName; }); From 5b04b71c4d1d9ef7b918a876c51f4d1788eb84c0 Mon Sep 17 00:00:00 2001 From: Edo Date: Sun, 30 Apr 2023 13:07:45 +0100 Subject: [PATCH 07/15] [Utils]: Code style update (#990) --- src/Utils/Cryptography.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Utils/Cryptography.cpp b/src/Utils/Cryptography.cpp index 7d003641..dd4047c7 100644 --- a/src/Utils/Cryptography.cpp +++ b/src/Utils/Cryptography.cpp @@ -19,13 +19,13 @@ namespace Utils std::string Rand::GenerateChallenge() { char buffer[512]{}; - int buffer_pos = 0; + int pos = 0; - buffer_pos += sprintf_s(&buffer[buffer_pos], sizeof(buffer) - buffer_pos, "%X", GenerateInt()); - buffer_pos += sprintf_s(&buffer[buffer_pos], sizeof(buffer) - buffer_pos, "%X", ~timeGetTime() ^ GenerateInt()); - buffer_pos += sprintf_s(&buffer[buffer_pos], sizeof(buffer) - buffer_pos, "%X", GenerateInt()); + pos += sprintf_s(&buffer[pos], sizeof(buffer) - pos, "%X", GenerateInt()); + pos += sprintf_s(&buffer[pos], sizeof(buffer) - pos, "%X", ~timeGetTime() ^ GenerateInt()); + pos += sprintf_s(&buffer[pos], sizeof(buffer) - pos, "%X", GenerateInt()); - return std::string(buffer, static_cast(buffer_pos)); + return std::string(buffer, static_cast(pos)); } std::uint32_t Rand::GenerateInt() From 233242a013fcc7399da9b7b5cb545092d41d952c Mon Sep 17 00:00:00 2001 From: Edo Date: Mon, 1 May 2023 22:50:42 +0100 Subject: [PATCH 08/15] [Proxy]: Format (#991) --- src/Components/Modules/Logger.cpp | 2 ++ src/DllMain.cpp | 2 +- src/Steam/Proxy.cpp | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Components/Modules/Logger.cpp b/src/Components/Modules/Logger.cpp index 46754220..851b04ea 100644 --- a/src/Components/Modules/Logger.cpp +++ b/src/Components/Modules/Logger.cpp @@ -122,10 +122,12 @@ namespace Components { Game::Com_PrintMessage(Game::CON_CHANNEL_DONT_FILTER, i->data(), 0); +#ifdef _DEBUG if (!IsConsoleReady()) { OutputDebugStringA(i->data()); } +#endif i = MessageQueue.erase(i); } diff --git a/src/DllMain.cpp b/src/DllMain.cpp index 35281e3d..1bcf5707 100644 --- a/src/DllMain.cpp +++ b/src/DllMain.cpp @@ -4,7 +4,6 @@ namespace Main { void Initialize() { - Utils::SetEnvironment(); Utils::Cryptography::Initialize(); Components::Loader::Initialize(); @@ -70,6 +69,7 @@ BOOL APIENTRY DllMain(HINSTANCE /*hinstDLL*/, DWORD fdwReason, LPVOID /*lpvReser } #endif + Utils::SetEnvironment(); Steam::Proxy::RunMod(); // Install entry point hook Utils::Hook(0x6BAC0F, Main::EntryPoint, HOOK_JUMP).install()->quick(); diff --git a/src/Steam/Proxy.cpp b/src/Steam/Proxy.cpp index 9ec04148..9d546d20 100644 --- a/src/Steam/Proxy.cpp +++ b/src/Steam/Proxy.cpp @@ -60,7 +60,7 @@ namespace Steam if (this->getMethodData(*vftbl, &name, ¶ms) && name == method) { - return{ vftbl->data, params }; + return { vftbl->data, params }; } ++vftbl; @@ -164,7 +164,7 @@ namespace Steam clientUtils.invoke("SetAppIDForCurrentPipe", Proxy::AppId, false); char ourPath[MAX_PATH]{}; - GetModuleFileNameA(GetModuleHandle(nullptr), ourPath, sizeof(ourPath)); + GetModuleFileNameA(GetModuleHandleA(nullptr), ourPath, sizeof(ourPath)); char ourDirectory[MAX_PATH]{}; GetCurrentDirectoryA(sizeof(ourDirectory), ourDirectory); From c3e26be9089442bf1ac7c55b5eecc268e6b74fa7 Mon Sep 17 00:00:00 2001 From: Edo Date: Tue, 2 May 2023 11:59:43 +0100 Subject: [PATCH 09/15] [Deps]: Cleanup (#992) --- deps/premake/mongoose.lua | 3 +-- deps/premake/udis86.lua | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/deps/premake/mongoose.lua b/deps/premake/mongoose.lua index aa29a89e..ffe546e2 100644 --- a/deps/premake/mongoose.lua +++ b/deps/premake/mongoose.lua @@ -20,8 +20,7 @@ function mongoose.project() mongoose.includes() - files - { + files { path.join(mongoose.source, "mongoose.c"), path.join(mongoose.source, "mongoose.h"), } diff --git a/deps/premake/udis86.lua b/deps/premake/udis86.lua index f4cf46b2..e639766c 100644 --- a/deps/premake/udis86.lua +++ b/deps/premake/udis86.lua @@ -3,7 +3,7 @@ udis86 = { } function udis86.import() - links {"udis86"} + links "udis86" udis86.includes() end From c5893c1cefcc639108b974ac4839896067156f75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 May 2023 17:57:58 +0000 Subject: [PATCH 10/15] Bump deps/zlib from `b8a8373` to `48c3741` Bumps [deps/zlib](https://github.com/madler/zlib) from `b8a8373` to `48c3741`. - [Release notes](https://github.com/madler/zlib/releases) - [Commits](https://github.com/madler/zlib/compare/b8a8373ec195c8d286fe7e81e78b4a6d31bd859f...48c3741002aca9dae84e9f2288ca149af14c9128) --- updated-dependencies: - dependency-name: deps/zlib dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- deps/zlib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/zlib b/deps/zlib index b8a8373e..48c37410 160000 --- a/deps/zlib +++ b/deps/zlib @@ -1 +1 @@ -Subproject commit b8a8373ec195c8d286fe7e81e78b4a6d31bd859f +Subproject commit 48c3741002aca9dae84e9f2288ca149af14c9128 From 926b9592d4b2a6c8e5b578dcd19929e24a8f77ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 May 2023 17:58:01 +0000 Subject: [PATCH 11/15] Bump deps/iw4-open-formats from `1bc514d` to `266165d` Bumps [deps/iw4-open-formats](https://github.com/XLabsProject/iw4-open-formats) from `1bc514d` to `266165d`. - [Release notes](https://github.com/XLabsProject/iw4-open-formats/releases) - [Commits](https://github.com/XLabsProject/iw4-open-formats/compare/1bc514d4c981532d1195b420a8fc0ce809c65944...266165d21d77dadfe2adb01b7f1bf0fe64832479) --- updated-dependencies: - dependency-name: deps/iw4-open-formats dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- deps/iw4-open-formats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/iw4-open-formats b/deps/iw4-open-formats index 1bc514d4..266165d2 160000 --- a/deps/iw4-open-formats +++ b/deps/iw4-open-formats @@ -1 +1 @@ -Subproject commit 1bc514d4c981532d1195b420a8fc0ce809c65944 +Subproject commit 266165d21d77dadfe2adb01b7f1bf0fe64832479 From 4c7353646c04b87006f24652bcc548953146dbcb Mon Sep 17 00:00:00 2001 From: Edo Date: Tue, 2 May 2023 20:42:31 +0100 Subject: [PATCH 12/15] [Stats]: Update Function (#995) --- src/Components/Modules/Stats.cpp | 4 ++-- src/Components/Modules/Stats.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Components/Modules/Stats.cpp b/src/Components/Modules/Stats.cpp index b2e8db16..9472a1d0 100644 --- a/src/Components/Modules/Stats.cpp +++ b/src/Components/Modules/Stats.cpp @@ -65,7 +65,7 @@ namespace Components SendStats(); } - int Stats::SaveStats(char* dest, const char* folder, const char* buffer, size_t length) + int Stats::SaveStats(char* dest, const char* folder, const char* buffer, int size) { assert(*Game::fs_gameDirVar); @@ -74,7 +74,7 @@ namespace Components folder = (*Game::fs_gameDirVar)->current.string; } - return Utils::Hook::Call(0x426450)(dest, folder, buffer, length); + return Utils::Hook::Call(0x426450)(dest, folder, buffer, size); } void Stats::AddScriptFunctions() diff --git a/src/Components/Modules/Stats.hpp b/src/Components/Modules/Stats.hpp index bee2ebce..63334841 100644 --- a/src/Components/Modules/Stats.hpp +++ b/src/Components/Modules/Stats.hpp @@ -13,7 +13,7 @@ namespace Components static void UpdateClasses([[maybe_unused]] const UIScript::Token& token, [[maybe_unused]] const Game::uiInfo_s* info); static void SendStats(); - static int SaveStats(char* dest, const char* folder, const char* buffer, size_t length); + static int SaveStats(char* dest, const char* folder, const char* buffer, int size); static std::int64_t* GetStatsID(); From dc3cc28693fcf642b5812ca7cfc0ebd6b64ab871 Mon Sep 17 00:00:00 2001 From: Edo Date: Wed, 3 May 2023 00:10:14 +0100 Subject: [PATCH 13/15] [Auth]: Remove whitespace (#996) --- src/Components/Modules/Auth.cpp | 4 ++-- src/Components/Modules/Console.cpp | 22 +++++++++++++++++++++- src/Components/Modules/Console.hpp | 5 +++++ src/Components/Modules/Maps.cpp | 12 ------------ src/Components/Modules/Zones.cpp | 12 ++++++------ src/Game/Functions.cpp | 2 ++ src/Game/Functions.hpp | 8 +++++++- 7 files changed, 43 insertions(+), 22 deletions(-) diff --git a/src/Components/Modules/Auth.cpp b/src/Components/Modules/Auth.cpp index af3dbb3c..3024699b 100644 --- a/src/Components/Modules/Auth.cpp +++ b/src/Components/Modules/Auth.cpp @@ -71,7 +71,7 @@ namespace Components TokenContainer.cancel = false; } } - + void Auth::SendConnectDataStub(Game::netsrc_t sock, Game::netadr_t adr, const char* format, int len) { // Ensure our certificate is loaded @@ -88,7 +88,7 @@ namespace Components Logger::Error(Game::ERR_SERVERDISCONNECT, "Your online profile is invalid. A new key has been generated."); return; } - + std::string connectString(format, len); Game::SV_Cmd_TokenizeString(connectString.data()); diff --git a/src/Components/Modules/Console.cpp b/src/Components/Modules/Console.cpp index 08b53d69..3699c58b 100644 --- a/src/Components/Modules/Console.cpp +++ b/src/Components/Modules/Console.cpp @@ -1,4 +1,4 @@ -#include +#include #include "Console.hpp" #include "TextRenderer.hpp" @@ -56,6 +56,8 @@ namespace Components Game::SafeArea Console::OriginalSafeArea; + bool Console::isCommand; + const char** Console::GetAutoCompleteFileList(const char* path, const char* extension, Game::FsListBehavior_e behavior, int* numfiles, int allocTrackType) { if (path == reinterpret_cast(0xBAADF00D) || path == reinterpret_cast(0xCDCDCDCD) || ::Utils::Memory::IsBadReadPtr(path)) return nullptr; @@ -807,6 +809,20 @@ namespace Components return reinterpret_cast(0x471500)(dvarName, r, g, b, a, min, max, flags, description); } + bool Console::Con_IsDvarCommand_Stub(const char* cmd) + { + isCommand = Game::Con_IsDvarCommand(cmd); + return isCommand; + } + + void Console::Cmd_ForEach_Stub(void(*callback)(const char* str)) + { + if (!isCommand) + { + Game::Cmd_ForEach(callback); + } + } + void Console::Con_ToggleConsole() { Game::Field_Clear(Game::g_consoleField); @@ -885,6 +901,10 @@ namespace Components // Don't resize the console Utils::Hook(0x64DC6B, 0x64DCC2, HOOK_JUMP).install()->quick(); + // Con_DrawInput + Utils::Hook(0x5A45BD, Con_IsDvarCommand_Stub, HOOK_CALL).install()->quick(); + Utils::Hook(0x5A466C, Cmd_ForEach_Stub, HOOK_CALL).install()->quick(); + #ifdef _DEBUG AddConsoleCommand(); #endif diff --git a/src/Components/Modules/Console.hpp b/src/Components/Modules/Console.hpp index 0ccad217..3bd9207a 100644 --- a/src/Components/Modules/Console.hpp +++ b/src/Components/Modules/Console.hpp @@ -49,6 +49,8 @@ namespace Components static Game::SafeArea OriginalSafeArea; + static bool isCommand; + static void ShowPrompt(); static void RefreshStatus(); static void RefreshOutput(); @@ -75,6 +77,9 @@ namespace Components static void AddConsoleCommand(); static Game::dvar_t* RegisterConColor(const char* dvarName, float r, float g, float b, float a, float min, float max, unsigned __int16 flags, const char* description); + + static bool Con_IsDvarCommand_Stub(const char* cmd); + static void Cmd_ForEach_Stub(void(*callback)(const char* str)); static LRESULT CALLBACK ConWndProc(HWND hWnd, UINT Msg, WPARAM wParam, unsigned int lParam); static ATOM CALLBACK RegisterClassHook(WNDCLASSA* lpWndClass); diff --git a/src/Components/Modules/Maps.cpp b/src/Components/Modules/Maps.cpp index da4a65f3..072319f5 100644 --- a/src/Components/Modules/Maps.cpp +++ b/src/Components/Modules/Maps.cpp @@ -813,18 +813,6 @@ namespace Components Utils::Hook::Set(0x64A029, 0x1C200000); // 450 MiB Utils::Hook::Set(0x64A057, 0x1C200000); -#if DEBUG - // Hunk debugging - Utils::Hook::Set(0x4FF57B, 0xCC); - Utils::Hook::Nop(0x4FF57C, 4); -#else - // Temporarily disable distortion warnings - Utils::Hook::Nop(0x50DBFF, 5); - Utils::Hook::Nop(0x50DC4F, 5); - Utils::Hook::Nop(0x50DCA3, 5); - Utils::Hook::Nop(0x50DCFE, 5); -#endif - // Intercept BSP name resolving Utils::Hook(0x4C5979, Maps::GetBSPName, HOOK_CALL).install()->quick(); diff --git a/src/Components/Modules/Zones.cpp b/src/Components/Modules/Zones.cpp index 2206df39..115306a5 100644 --- a/src/Components/Modules/Zones.cpp +++ b/src/Components/Modules/Zones.cpp @@ -3407,10 +3407,10 @@ namespace Components constexpr auto fileCountMultiplier = 8; constexpr auto maxFileCount = 8191 * fileCountMultiplier; - int RelocateFileCount(std::uint32_t dwSize, int unk1, int unk2, int unk3) + Game::HunkUser* Hunk_UserCreate_Stub(int maxSize, const char* name, bool fixed, int type) { - dwSize *= fileCountMultiplier; - return Utils::Hook::Call(0x430E90)(dwSize, unk1, unk2, unk3); + maxSize *= fileCountMultiplier; + return Utils::Hook::Call(0x430E90)(maxSize, name, fixed, type); } void Zones::LoadMaterialAsset(Game::Material** asset) @@ -3554,8 +3554,8 @@ namespace Components Utils::Hook::Set(0x64AF78, maxFileCount); Utils::Hook::Set(0x64B04F, maxFileCount); Utils::Hook::Set(0x45A8CE, maxFileCount); - Utils::Hook(0x45A806, RelocateFileCount, HOOK_CALL).install()->quick(); - Utils::Hook(0x45A6A0, RelocateFileCount, HOOK_CALL).install()->quick(); + Utils::Hook(0x45A806, Hunk_UserCreate_Stub, HOOK_CALL).install()->quick(); + Utils::Hook(0x45A6A0, Hunk_UserCreate_Stub, HOOK_CALL).install()->quick(); #ifndef DEBUG // Ignore missing soundaliases for now @@ -3662,4 +3662,4 @@ namespace Components #endif } } -#pragma optimize( "", on ) \ No newline at end of file +#pragma optimize( "", on ) diff --git a/src/Game/Functions.cpp b/src/Game/Functions.cpp index 1d5af994..51e4e8d6 100644 --- a/src/Game/Functions.cpp +++ b/src/Game/Functions.cpp @@ -25,10 +25,12 @@ namespace Game Cmd_AddCommand_t Cmd_AddCommand = Cmd_AddCommand_t(0x470090); Cmd_AddServerCommand_t Cmd_AddServerCommand = Cmd_AddServerCommand_t(0x4DCE00); Cmd_ExecuteSingleCommand_t Cmd_ExecuteSingleCommand = Cmd_ExecuteSingleCommand_t(0x609540); + Cmd_ForEach_t Cmd_ForEach = Cmd_ForEach_t(0x45D680); Con_DrawMiniConsole_t Con_DrawMiniConsole = Con_DrawMiniConsole_t(0x464F30); Con_DrawSolidConsole_t Con_DrawSolidConsole = Con_DrawSolidConsole_t(0x5A5040); Con_CancelAutoComplete_t Con_CancelAutoComplete = Con_CancelAutoComplete_t(0x435580); + Con_IsDvarCommand_t Con_IsDvarCommand = Con_IsDvarCommand_t(0x5A3FF0); DB_AllocStreamPos_t DB_AllocStreamPos = DB_AllocStreamPos_t(0x418380); DB_PushStreamPos_t DB_PushStreamPos = DB_PushStreamPos_t(0x458A20); diff --git a/src/Game/Functions.hpp b/src/Game/Functions.hpp index 2618d37c..832d36de 100644 --- a/src/Game/Functions.hpp +++ b/src/Game/Functions.hpp @@ -60,7 +60,10 @@ namespace Game typedef void(*Cmd_ExecuteSingleCommand_t)(int localClientNum, int controllerIndex, const char* cmd); extern Cmd_ExecuteSingleCommand_t Cmd_ExecuteSingleCommand; - typedef char* (*Con_DrawMiniConsole_t)(int localClientNum, int xPos, int yPos, float alpha); + typedef void(*Cmd_ForEach_t)(void(*callback)(const char* str)); + extern Cmd_ForEach_t Cmd_ForEach; + + typedef char*(*Con_DrawMiniConsole_t)(int localClientNum, int xPos, int yPos, float alpha); extern Con_DrawMiniConsole_t Con_DrawMiniConsole; typedef void (*Con_DrawSolidConsole_t)(); @@ -69,6 +72,9 @@ namespace Game typedef bool(*Con_CancelAutoComplete_t)(); extern Con_CancelAutoComplete_t Con_CancelAutoComplete; + typedef bool(*Con_IsDvarCommand_t)(const char* cmd); + extern Con_IsDvarCommand_t Con_IsDvarCommand; + typedef bool(*Encode_Init_t)(const char* ); extern Encode_Init_t Encode_Init; From b29374c9ee9b4562f738acc77e8ef5070b17607b Mon Sep 17 00:00:00 2001 From: Edo Date: Wed, 3 May 2023 12:40:44 +0100 Subject: [PATCH 14/15] [CHANGELOG]: Amend (#997) --- CHANGELOG.md | 76 +++++++++++++++++++------- src/Components/Modules/MapRotation.cpp | 2 +- 2 files changed, 56 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c9138b3..dc8160df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,13 +46,22 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. ### Changed - `sv_mapRotationCurrent` supports `exec` directive for executing cfg scripts from the `game_settings` folder (#916) -- `SetPing` GSC method is now deprecated. +- `SetPing` GSC method is now deprecated (#903) + +### Security + +- Fix DOS exploit in the network protocol of the game (#942) ### Fixed - `sv_privatePassword` will work as intended (#908) - Fix crash when loading bots.txt file (#927) +### Removed + +- Remove `GetIp` GSC method (#903) +- Remove `GetPing` GSC method (#903) + ### Known issues - Sound issue fix is experimental as the bug is not fully understood. @@ -114,7 +123,6 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. - Servers can no longer modify client Dvars that are saved in the client's config (#694) - `banClient` and `muteClient` server commands do not apply to bots anymore (#730) -- Remove `zb_prefer_disk_assets` Dvar (#772) - The max value of `perk_extendedMeleeRange` Dvar was increased (#782) - Test Clients will receive names from the Xlabs Patreon website in addition to the names from the bots.txt file (#771) @@ -128,6 +136,10 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. - Fix bug where `FileRead` GSC function could return buffers that are too big (#767) - Fix bug where the `OnPlayerSay` GSC function would cause issues (#776) +### Removed + +- Remove `zb_prefer_disk_assets` Dvar (#772) + ### Known issues - Sound issue fix is experimental as the bug is not fully understood. @@ -171,6 +183,10 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. - Static models are now lit correctly depending on their position and ground lighting. - New map porting utility ports sounds and effects properly. +### Removed + +- Remove `HttpGet`& `HttpCancel` (#603) + ### Known issues - HTTPS is not supported for fast downloads at the moment. @@ -192,7 +208,6 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. ### Changed -- Remove non-existent menus from code (#483) - Change font and colour of the external console (#477) ### Fixed @@ -202,6 +217,7 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. - Fix party server not receiving packets (#500) - Fix crash caused by server thread issues (#561) - Fix hours spent playing IW4x not counting towards the hours spent playing MW2 on Steam (#573) +- Remove non-existent menus from code (#483) ### Known issues @@ -226,9 +242,12 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. ### Changed - Steam status is no longer set to busy (#417) -- `HttpGet`& `HttpCancel` are disabled for security reasons (#449) - `g_allowVote` is a replicated Dvar (#457) +### Security + +- Disable `HttpGet`& `HttpCancel` (#449) + ### Fixed - Fixed `startSingleplayer` command (#404) @@ -249,18 +268,13 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. - Add `protect-saved-dvars` command line argument (#335) - Add `clanName` dvar. Can be edited in the `barracks` menu (#361) - Add DLC9 containing classic maps from CoD4: Backlot, Chinatown, Winter Crash, Pipeline and Downpour +- Add to the iw4x-rawfiles `common_scripts\iw4x_utility` GSC script, it contains the scripts-based solution for the removed GSC built-in methods ### Changed - `sv_mapRotationCurrent` functionality has been restored for backwards compatibility (#328) - GSC IO Functions are restricted to the `scriptdata` folder (#322) - `scriptablehttp` command line argument is no longer needed (#322) -- Removed `noclip` built-in GSC method. Replaced with script-based solution (#387) -- Removed `ufo` built-in GSC method. Replaced with script-based solution (#387) -- Removed `god` built-in GSC method. Replaced with script-based solution (#388) -- Removed `demiGod` built-in GSC method. Replaced with script-based solution (#388) -- Removed `noTarget` built-in GSC method. Replaced with script-based solution (#388) -- Added to the iw4x-rawfiles `common_scripts\iw4x_utility` GSC script, it contains the scripts-based solution for the removed GSC built-in methods ### Fixed @@ -274,6 +288,14 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. - Fixed issue where grenades and projectiles had no bounce sounds (#368) - Fixed issue that could cause the game to crash when loading CoD4 maps (#372) +### Removed + +- Remove `noclip` built-in GSC method. Replaced with script-based solution (#387) +- Remove `ufo` built-in GSC method. Replaced with script-based solution (#387) +- Remove `god` built-in GSC method. Replaced with script-based solution (#388) +- Remove `demiGod` built-in GSC method. Replaced with script-based solution (#388) +- Remove `noTarget` built-in GSC method. Replaced with script-based solution (#388) + ### Known issues - HTTPS is not supported for fast downloads at the moment. @@ -294,9 +316,12 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. ### Changed -- `openLink` command was removed for security reasons (#286) - `sv_mapRotationCurrent` is not being used anymore (#302) +### Security + +- Remove `openLink` command (#286) + ### Fixed - Fix font generation (#277) @@ -371,12 +396,12 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. ### Added -- Added controller support (#75) -- Added aim assist for controllers (#75) +- Add controller support (#75) +- Add aim assist for controllers (#75) - Unlock camera_thirdPersonCrosshairOffset Dvar (#68) -- Added support for building custom Fonts with Zonebuilder (#88) -- Added colorblind friendly team colors (#101) -- Added emojis based on titlecards and emblems to use in the chat and server names Example: `:nuke:` (#130) +- Add support for building custom Fonts with Zonebuilder (#88) +- Add colorblind friendly team colors (#101) +- Add emojis based on titlecards and emblems to use in the chat and server names Example: `:nuke:` (#130) - Upon leaving a server 'archive' dvars (saved in the config file) will be reset to the value they had prior to joining the server (#134) - Implement muteClient command for the game chat (#159) - Implement unmute command for the game chat (#159) @@ -457,13 +482,12 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. - Add r_specularCustomMaps Dvar (#36) - Unlock safeArea_horizontal and safeArea_vertical Dvars (#42) - Unlock cg_fovscale Dvar (#47) -- Added g_antilag Dvar (#61) +- Add g_antilag Dvar (#61) ### Changed - Stats are now separate for each mod (#6). Player stats are copied to `fs_game` folder if no stats exist for this mod yet. Keep in mind this also means that level, XP and classes will not be synchronized with the main stats file after this point. - Reduced duration of toasts (#48) -- Removed old updater functionality (#54) - Use old bot names if bots.txt is not found (#46) ### Fixed @@ -474,6 +498,10 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. - Fixed an issue causing the game to crash when Steam was running in the background (#56) - Fixed slow download speed when using fast download +### Removed + +- Removed old updater functionality (#54) + ### Known issues - HTTPS is not supported for fast downloads at the moment. @@ -558,8 +586,6 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. - Show friend avatars when they play IW4x (request). - Rewrite and optimize the entire node system. -- Remove syncnode command for node system. -- Remove steam start. ### Fixed @@ -569,6 +595,11 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. - Fix crashes caused by a bug in file/data compression. - Improve overall stability. +### Removed + +- Remove syncnode command for node system. +- Remove steam start. + ## [0.5.0] - 2017-06-04 ### Added @@ -648,7 +679,6 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. - Disabled big minidump message box. - Limit dedicated servers to 15 instances per IP. - Move build number location. -- Remove news ticker and friends button from theater. ### Fixed @@ -662,6 +692,10 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. - Fix weapon crash issue. - Potentially fix no-ammo bug. +### Removed + +- Remove news ticker and friends button from theater. + ## [0.3.2] - 2017-02-12 This is the third public Beta version. diff --git a/src/Components/Modules/MapRotation.cpp b/src/Components/Modules/MapRotation.cpp index f6daef67..e3f109ff 100644 --- a/src/Components/Modules/MapRotation.cpp +++ b/src/Components/Modules/MapRotation.cpp @@ -260,7 +260,7 @@ namespace Components if (svMapname.empty()) { - Logger::Print(Game::CON_CHANNEL_SERVER, "mapname dvar is empty! Defaulting to mp_afghan\n"); + Logger::Print(Game::CON_CHANNEL_SERVER, "{} dvar is empty! Defaulting to mp_afghan\n", (*Game::sv_mapname)->name); svMapname = "mp_afghan"s; } From e1cd5766d537ec4082757b8d93bff69b4e2fa2df Mon Sep 17 00:00:00 2001 From: Edo Date: Wed, 3 May 2023 13:29:17 +0100 Subject: [PATCH 15/15] [General]: Prepare new release (#998) --- CHANGELOG.md | 25 ++++++++++++++++++++++--- src/Components/Modules/Bots.cpp | 3 --- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc8160df..c232ce76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,25 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0.3.0/). +## r4246 - 2023-05-03 + +### Added + +- Add to the iw4x-rawfiles common_scripts\utility GSC script `setPing` & `getPing` for backward compatibility. + +### Fixed + +- Fix bug with Steam Proxy (#991) +- Fix bug with the `say` GSC notify in regards to hidden commands (#989) + +### Removed + +- SetPing GSC method (#998) + +### Known issues + +- Sound issue fix is experimental as the bug is not fully understood. + ## r4226 - 2023-04-26 ### Changed @@ -267,12 +286,12 @@ The format is based on [Keep a Changelog v0.3.0](http://keepachangelog.com/en/0. - Add `EnableWeaponPickup` GSC method (#329) - Add `protect-saved-dvars` command line argument (#335) - Add `clanName` dvar. Can be edited in the `barracks` menu (#361) -- Add DLC9 containing classic maps from CoD4: Backlot, Chinatown, Winter Crash, Pipeline and Downpour -- Add to the iw4x-rawfiles `common_scripts\iw4x_utility` GSC script, it contains the scripts-based solution for the removed GSC built-in methods +- Add DLC9 containing classic maps from CoD4: Backlot, Chinatown, Winter Crash, Pipeline and Downpour. +- Add to the iw4x-rawfiles `common_scripts\iw4x_utility` GSC script, it contains the scripts-based solution for the removed GSC built-in methods. ### Changed -- `sv_mapRotationCurrent` functionality has been restored for backwards compatibility (#328) +- `sv_mapRotationCurrent` functionality has been restored for backward compatibility (#328) - GSC IO Functions are restricted to the `scriptdata` folder (#322) - `scriptablehttp` command line argument is no longer needed (#322) diff --git a/src/Components/Modules/Bots.cpp b/src/Components/Modules/Bots.cpp index dcb26b50..1eb60f70 100644 --- a/src/Components/Modules/Bots.cpp +++ b/src/Components/Modules/Bots.cpp @@ -272,9 +272,6 @@ namespace Components g_botai[entref.entnum].right = static_cast(rightInt); g_botai[entref.entnum].active = true; }); - - GSC::Script::AddMethod("SetPing", []([[maybe_unused]] const Game::scr_entref_t entref) - {}); } void Bots::BotAiAction(Game::client_t* cl)