Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Checkout HL2SDK
uses: actions/checkout@v7
with:
repository: alliedmodders/hl2sdk
repository: alliedmodders/s2sdk
ref: cs2
path: hl2sdk-cs2

Expand Down
10 changes: 6 additions & 4 deletions src/cleanercs2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

#include <stdio.h>
#include "cleanercs2.h"
#include <iserver.h>
#include <engine2/isource2server.h>
#include <engine2/ivengineserver2.h>
#include <engine2/inetworkserverservice.h>
#include "khook.hpp"
#include "utils/module.h"
#include <iostream>
Expand Down Expand Up @@ -48,13 +50,13 @@ IVEngineServer *engine = NULL;
IGameEventManager2 *gameevents = NULL;
ICvar *icvar = NULL;

typedef int (*LogDirect_t)(void* loggingSystem, int channel, int severity, LeafCodeInfo_t*, char const*, va_list*);
typedef int (*LogDirect_t)(void* loggingSystem, int channel, int severity, LoggingRareOptions_t*, char const*, va_list*);

std::vector<re2::RE2*> g_RegexList;
std::shared_mutex g_RegexMutex;
thread_local bool g_BypassFilter = false;

KHook::Return<int> Detour_LogDirect(void* loggingSystem, int channel, int severity, LeafCodeInfo_t* leafCode, char const* str, va_list* args)
KHook::Return<int> Detour_LogDirect(void* loggingSystem, int channel, int severity, LoggingRareOptions_t* leafCode, char const* str, va_list* args)
{
if (g_BypassFilter)
return {KHook::Action::Ignore};
Expand All @@ -81,7 +83,7 @@ KHook::Return<int> Detour_LogDirect(void* loggingSystem, int channel, int severi
return {KHook::Action::Ignore};
}

KHook::Function<int, void*, int, int, LeafCodeInfo_t*, char const*, va_list*> logDirectHook(Detour_LogDirect, nullptr);
KHook::Function<int, void*, int, int, LoggingRareOptions_t*, char const*, va_list*> logDirectHook(Detour_LogDirect, nullptr);

bool SetupHook()
{
Expand Down
2 changes: 1 addition & 1 deletion src/utils/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#pragma once
#include "dbg.h"
#include "interface.h"
#include "strtools.h"
#include "tier0_strtools.h"
#include "plat.h"

#ifdef _WIN32
Expand Down
1 change: 1 addition & 0 deletions src/utils/plat_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "module.h"
#include "plat.h"

#include "tier0/memdbgon.h"
Expand Down
2 changes: 1 addition & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ target("CleanerCS2-Xmake")
set_symbols("hidden")

add_files({
SDK_PATH.."/tier1/convar.cpp",
SDK_PATH.."/tier0_perproject/convar.cpp",
SDK_PATH.."/public/tier0/memoverride.cpp",
})

Expand Down