Skip to content

Commit

Permalink
Fix other Linux issues (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
qubka committed Sep 1, 2024
1 parent 45ac1d8 commit d70a659
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 20 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ include("cmake/shared.cmake")
file(GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.cpp")

set(SOURCE_FILES ${SOURCE_FILES}
${SOURCESDK_DIR}/interfaces/interfaces.cpp
${SOURCESDK_DIR}/tier1/convar.cpp
${SOURCESDK_DIR}/tier1/generichash.cpp
#${SOURCESDK_DIR}/tier1/keyvalues3.cpp
Expand Down
4 changes: 2 additions & 2 deletions cmake/linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ set_compile_options(libprotobuf)

set(CS2SDK_LINK_LIBRARIES
${SOURCESDK_LIB}/linux64/libtier0.so
${SOURCESDK_LIB}/linux64/tier1.a
${SOURCESDK_LIB}/linux64/interfaces.a
#${SOURCESDK_LIB}/linux64/tier1.a
#${SOURCESDK_LIB}/linux64/interfaces.a
#${SOURCESDK_LIB}/linux64/mathlib.a
#${SOURCESDK_LIB}/linux64/release/libprotobuf.a
protobuf::libprotobuf
Expand Down
4 changes: 2 additions & 2 deletions cmake/windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ set_compile_options(libprotobuf)

set(CS2SDK_LINK_LIBRARIES
${SOURCESDK_LIB}/public/win64/tier0.lib
${SOURCESDK_LIB}/public/win64/tier1.lib
${SOURCESDK_LIB}/public/win64/interfaces.lib
#${SOURCESDK_LIB}/public/win64/tier1.lib
#${SOURCESDK_LIB}/public/win64/interfaces.lib
#${SOURCESDK_LIB}/public/win64/mathlib.lib
#${SOURCESDK_LIB}/public/win64/2015/libprotobuf.lib
protobuf::libprotobuf
Expand Down
2 changes: 1 addition & 1 deletion external/hl2sdk-cs2
4 changes: 2 additions & 2 deletions src/core/player_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,12 @@ void CPlayerManager::OnClientPutInServer(CPlayerSlot slot, char const* pszName,
{
pPlayer->m_bFakeClient = true;

CBufferStringGrowable<255> buffer;
/*CBufferStringGrowable<255> buffer;
if (!OnClientConnect(slot, pszName, 0, "127.0.0.1", false, &buffer))
{
pPlayer->Kick();
return;
}
}*/

GetOnClientConnect_PostListenerManager().Notify(pPlayer->m_iSlot.Get());
}
Expand Down
26 changes: 13 additions & 13 deletions src/core/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ void Source2SDK::OnPluginStart()
using enum dyno::CallbackType;
g_HookManager.AddHookMemFunc(&IMetamodListener::OnLevelInit, g_pMetamodListener, Hook_OnLevelInit, Post);
g_HookManager.AddHookMemFunc(&IMetamodListener::OnLevelShutdown, g_pMetamodListener, Hook_OnLevelShutdown, Post);
//g_HookManager.AddHookMemFunc(&IServerGameDLL::GameFrame, g_pSource2Server, Hook_GameFrame, Post);
g_HookManager.AddHookMemFunc(&IServerGameClients::ClientActive, g_pSource2GameClients, Hook_ClientActive, Post);
g_HookManager.AddHookMemFunc(&IServerGameClients::ClientDisconnect, g_pSource2GameClients, Hook_ClientDisconnect, Pre, Post);
g_HookManager.AddHookMemFunc(&IServerGameClients::ClientPutInServer, g_pSource2GameClients, Hook_ClientPutInServer, Post);
g_HookManager.AddHookMemFunc(&IServerGameClients::ClientSettingsChanged, g_pSource2GameClients, Hook_ClientSettingsChanged, Post);
g_HookManager.AddHookMemFunc(&IServerGameClients::OnClientConnected, g_pSource2GameClients, Hook_OnClientConnected, Post);
g_HookManager.AddHookMemFunc(&IServerGameClients::ClientFullyConnect, g_pSource2GameClients, Hook_ClientFullyConnect, Post);
g_HookManager.AddHookMemFunc(&IServerGameClients::ClientConnect, g_pSource2GameClients, Hook_ClientConnect, Pre, Post);
g_HookManager.AddHookMemFunc(&IServerGameClients::ClientCommand, g_pSource2GameClients, Hook_ClientCommand, Pre);
g_HookManager.AddHookMemFunc(&IServerGameDLL::GameFrame, g_pSource2Server, Hook_GameFrame, Post);
//g_HookManager.AddHookMemFunc(&IServerGameClients::ClientActive, g_pSource2GameClients, Hook_ClientActive, Post);
//g_HookManager.AddHookMemFunc(&IServerGameClients::ClientDisconnect, g_pSource2GameClients, Hook_ClientDisconnect, Pre, Post);
//g_HookManager.AddHookMemFunc(&IServerGameClients::ClientPutInServer, g_pSource2GameClients, Hook_ClientPutInServer, Post);
//g_HookManager.AddHookMemFunc(&IServerGameClients::ClientSettingsChanged, g_pSource2GameClients, Hook_ClientSettingsChanged, Post);
//g_HookManager.AddHookMemFunc(&IServerGameClients::OnClientConnected, g_pSource2GameClients, Hook_OnClientConnected, Post);
//g_HookManager.AddHookMemFunc(&IServerGameClients::ClientFullyConnect, g_pSource2GameClients, Hook_ClientFullyConnect, Post);
//g_HookManager.AddHookMemFunc(&IServerGameClients::ClientConnect, g_pSource2GameClients, Hook_ClientConnect, Pre, Post);
//g_HookManager.AddHookMemFunc(&IServerGameClients::ClientCommand, g_pSource2GameClients, Hook_ClientCommand, Pre);
g_HookManager.AddHookMemFunc(&INetworkServerService::StartupServer, g_pNetworkServerService, Hook_StartupServer, Post);
//g_HookManager.AddHookMemFunc(&ISource2GameEntities::CheckTransmit, g_pSource2GameEntities, Hook_CheckTransmit, Post);
//using PostEventAbstract = void (IGameEventSystem::*)(CSplitScreenSlot nSlot, bool bLocalOnly, int nClientCount, const uint64* clients, INetworkSerializable* pEvent, const void* pData, unsigned long nSize, NetChannelBufType_t bufType);
Expand All @@ -98,11 +98,11 @@ void Source2SDK::OnPluginStart()
using GameEventManagerInit = void (*)(IGameEventManager2*);
g_HookManager.AddHookDetourFunc<GameEventManagerInit>("CGameEventManager_Init", Hook_GameEventManagerInit, Pre);

using FireOutputInternal = void (*)(CEntityIOOutput* const, CEntityInstance*, CEntityInstance*, const CVariant* const, float);
g_HookManager.AddHookDetourFunc<FireOutputInternal>("CEntityIOOutput_FireOutputInternal", Hook_FireOutputInternal, Pre);
//using FireOutputInternal = void (*)(CEntityIOOutput* const, CEntityInstance*, CEntityInstance*, const CVariant* const, float);
//g_HookManager.AddHookDetourFunc<FireOutputInternal>("CEntityIOOutput_FireOutputInternal", Hook_FireOutputInternal, Pre);

using SayText2Filter = void (*)(IRecipientFilter &, CCSPlayerController *, uint64_t, const char *, const char *, const char *, const char *, const char *);
g_HookManager.AddHookDetourFunc<SayText2Filter>("UTIL_SayText2Filter", Hook_SayText2Filter, Pre);
//using SayText2Filter = void (*)(IRecipientFilter &, CCSPlayerController *, uint64_t, const char *, const char *, const char *, const char *, const char *);
//g_HookManager.AddHookDetourFunc<SayText2Filter>("UTIL_SayText2Filter", Hook_SayText2Filter, Pre);

OnServerStartup(); // for late load
}
Expand Down

0 comments on commit d70a659

Please sign in to comment.