diff --git a/Makefile b/Makefile index 8401e14..925dec7 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ CFLAGS = $(OPT_FLAGS) CFLAGS += -g0 -fvisibility=hidden -DNOMINMAX -fvisibility-inlines-hidden\ -DNDEBUG -Dlinux -D__linux__ -std=c++11 -shared -wd147,274 -fasm-blocks\ -Qoption,cpp,--treat_func_as_string_literal_cpp -fno-rtti\ - -D_byteswap_ulong=_bswap -D_mkdir=mkdir -D_stricmp=strcasecmp + -D_byteswap_ulong=_bswap -D_vsnprintf=vsnprintf -D_mkdir=mkdir -D_stricmp=strcasecmp OBJ_LINUX := $(OBJECTS:%.c=$(BIN_DIR)/%.o) diff --git a/src/main.h b/src/main.h index e7aabbe..1207d10 100644 --- a/src/main.h +++ b/src/main.h @@ -18,6 +18,13 @@ #pragma once +#include "consistency.h" + +void UTIL_Printf(const char *fmt, ...); +void UTIL_LogPrintf(const char *fmt, ...); +char *UTIL_VarArgs(const char *format, ...); +void NORETURN Sys_Error(const char *error, ...); + void SV_DropClient(IRehldsHook_SV_DropClient *chain, IGameClient *pClient, bool crash, const char *string); bool SV_CheckConsistencyResponse(IRehldsHook_SV_CheckConsistencyResponse *chain, IGameClient *pSenderClient, resource_t *resource, uint32 hash); int SV_TransferConsistencyInfo(IRehldsHook_SV_TransferConsistencyInfo *chain); diff --git a/src/precompiled.h b/src/precompiled.h index b572e77..4548d58 100644 --- a/src/precompiled.h +++ b/src/precompiled.h @@ -36,12 +36,12 @@ #include "engine_rehlds.h" #include "consistency.h" +#include "main.h" #include "engine_hlds_api.h" #include "hookchains_impl.h" #include "rechecker_api.h" #include "rechecker_api_impl.h" -#include "main.h" #include "resource.h" #include "cmdexec.h" @@ -57,8 +57,3 @@ #define NORETURN __attribute__((noreturn)) #define WINAPI /* */ #endif // _WIN32 - -extern void UTIL_Printf(const char *fmt, ...); -extern void UTIL_LogPrintf(const char *fmt, ...); -extern char *UTIL_VarArgs(const char *format, ...); -extern void NORETURN Sys_Error(const char *error, ...); diff --git a/src/resource.cpp b/src/resource.cpp index 3d601a6..dbf277d 100644 --- a/src/resource.cpp +++ b/src/resource.cpp @@ -51,7 +51,6 @@ int CResourceFile::CreateResourceList() int nIndex = m_HeadResource.nIndex + 1; int nCustomConsistency = 1; - std::vector sortList; for (auto res : m_resourceList) { // Prevent duplicate of filenames @@ -98,6 +97,7 @@ int CResourceFile::CreateResourceList() } } + std::vector sortList; for (int i = 0; i < g_RehldsServerData->GetResourcesNum(); i++) { sortList.push_back(*g_RehldsServerData->GetResource(i));