diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c8b3087..7196979 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,12 +44,12 @@ jobs: uses: ammaraskar/msvc-problem-matcher@master - name: Build ${{matrix.configuration}} binaries - run: msbuild /m /v:minimal /p:Configuration=${{matrix.configuration}} build/black-ops-plugin.sln + run: msbuild /m /v:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=Win32 build/black-ops-plugin.sln - name: Upload ${{matrix.configuration}} binaries uses: actions/upload-artifact@v2 with: name: ${{matrix.configuration}} binaries path: | - build/bin/x86/${{matrix.configuration}}/black-ops-plugin.dll - build/bin/x86/${{matrix.configuration}}/black-ops-plugin.pdb + build/bin/Win32/${{matrix.configuration}}/black-ops-plugin.dll + build/bin/Win32/${{matrix.configuration}}/black-ops-plugin.pdb diff --git a/premake5.lua b/premake5.lua index d634da0..4bfa58b 100644 --- a/premake5.lua +++ b/premake5.lua @@ -42,7 +42,7 @@ language "C++" cppdialect "C++20" architecture "x86" -platforms "x86" +platforms "Win32" systemversion "latest" symbols "On" @@ -53,7 +53,7 @@ characterset "ASCII" flags { "NoIncrementalLink", "NoMinimalRebuild", "MultiProcessorCompile", "No64BitChecks" } -filter "platforms:x86" +filter "platforms:Win*" defines {"_WINDOWS", "WIN32"} filter {} diff --git a/src/component/bots.cpp b/src/component/bots.cpp index f8098d6..7e8d39c 100644 --- a/src/component/bots.cpp +++ b/src/component/bots.cpp @@ -7,8 +7,7 @@ namespace bots { namespace { -typedef std::pair bot_entry; - +using bot_entry = std::pair; std::vector bot_names; utils::hook::detour sv_bot_name_random_hook; diff --git a/src/component/chat.cpp b/src/component/chat.cpp index 20df257..1b2aa69 100644 --- a/src/component/chat.cpp +++ b/src/component/chat.cpp @@ -13,6 +13,7 @@ std::unordered_set mute_list{}; void mute_player(const game::client_s* cl) { std::unique_lock _(chat_mutex); + if (mute_list.contains(cl->xuid)) { game::SV_GameSendServerCommand( -1, game::SV_CMD_CAN_IGNORE, @@ -25,6 +26,7 @@ void mute_player(const game::client_s* cl) { void unmute_player(const game::client_s* cl) { std::unique_lock _(chat_mutex); + mute_list.erase(cl->xuid); game::SV_GameSendServerCommand( diff --git a/src/game/structs.hpp b/src/game/structs.hpp index a3ec7ce..ede1690 100644 --- a/src/game/structs.hpp +++ b/src/game/structs.hpp @@ -220,7 +220,7 @@ typedef enum : char { DVAR_TYPE_INT64 = 0x9, DVAR_TYPE_LINEAR_COLOR_RGB = 0xA, DVAR_TYPE_COLOR_XYZ = 0xB, - DVAR_TYPE_COUNT = 0xC + DVAR_TYPE_COUNT = 0xC, } dvarType_t; union DvarValue {