From 9853c4ef8d44b658acfe64d1b422d2265926622f Mon Sep 17 00:00:00 2001 From: SmileYZn Date: Thu, 12 Sep 2024 16:32:57 -0300 Subject: [PATCH] Test Build Test Build --- AccuracyFix/AccuracyFix.cpp | 4 ++-- AccuracyFix/Makefile | 8 +++++--- AccuracyFix/MetaDLL.cpp | 3 +-- AccuracyFix/MetaEngine.cpp | 3 --- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/AccuracyFix/AccuracyFix.cpp b/AccuracyFix/AccuracyFix.cpp index d4749b9..262ffb7 100644 --- a/AccuracyFix/AccuracyFix.cpp +++ b/AccuracyFix/AccuracyFix.cpp @@ -50,7 +50,7 @@ void CAccuracyFix::ServerActivate() void CAccuracyFix::TraceLine(const float* vStart, const float* vEnd, int fNoMonsters, edict_t* pentToSkip, TraceResult* ptr) { - /*if ((fNoMonsters == dont_ignore_monsters) && (gpGlobals->trace_flags != FTRACE_FLASH)) + if ((fNoMonsters == dont_ignore_monsters) && (gpGlobals->trace_flags != FTRACE_FLASH)) { if (!FNullEnt(pentToSkip)) { @@ -109,6 +109,6 @@ void CAccuracyFix::TraceLine(const float* vStart, const float* vEnd, int fNoMons } } } - }*/ + } } diff --git a/AccuracyFix/Makefile b/AccuracyFix/Makefile index 337e745..ad46573 100644 --- a/AccuracyFix/Makefile +++ b/AccuracyFix/Makefile @@ -19,7 +19,7 @@ OBJECTS = *.cpp LINKER = -static-libgcc -static-libstdc++ # C flags -CFLAGS = -std=gnu++11 -shared -m32 -msse3 -msse4.1 -pipe -g0 -O3 -s -flto -funroll-loops -fno-stack-protector -g -DNDEBUG -Dlinux -D__linux__ -DGLIBCXX_USE_CXX11_ABI=1 -U_FORTIFY_SOURCE +CFLAGS = -std=gnu++11 -shared -mtune=generic -m32 -msse3 -msse4.1 -pipe -g0 -O3 -s -flto -funroll-loops -fno-stack-protector -g -DNDEBUG -Dlinux -D__linux__ -DGLIBCXX_USE_CXX11_ABI=0 -U_FORTIFY_SOURCE # Include directory INCLUDE = -I. -I$(CSSDK)/common -I$(CSSDK)/dlls -I$(CSSDK)/engine -I$(CSSDK)/game_shared -I$(CSSDK)/pm_shared -I$(CSSDK)/public -I$(METAMOD) @@ -36,14 +36,16 @@ $(BIN_DIR)/%.o: %.c all: mkdir -p $(BIN_DIR) - $(MAKE) $(NAME) && strip -x $(BIN_DIR)/$(NAME)_mm.so + $(MAKE) $(NAME) + + strip -x $(BIN_DIR)/$(NAME)_mm.so $(NAME): $(OBJ_LINUX) $(COMPILER) $(INCLUDE) $(CFLAGS) $(OBJ_LINUX) $(LINKER) -o$(BIN_DIR)/$(NAME)_mm.so check: - cppcheck $(INCLUDE) --quiet --max-configs=100 --std=gnu++11 -DNDEBUG -Dlinux -D__linux__ -U_FORTIFY_SOURCE . + cppcheck $(INCLUDE) --quiet --max-configs=100 --std=gnu++11 -DNDEBUG -Dlinux -D__linux__ -DGLIBCXX_USE_CXX11_ABI=0 -U_FORTIFY_SOURCE . default: all diff --git a/AccuracyFix/MetaDLL.cpp b/AccuracyFix/MetaDLL.cpp index 9bb5d2a..8cb7c9d 100644 --- a/AccuracyFix/MetaDLL.cpp +++ b/AccuracyFix/MetaDLL.cpp @@ -11,7 +11,6 @@ C_DLLEXPORT int GetEntityAPI2(DLL_FUNCTIONS* pFunctionTable, int* interfaceVersi { memset(&gDLL_FunctionTable_Pre, 0, sizeof(DLL_FUNCTIONS)); - // Register Functions Here // memcpy(pFunctionTable, &gDLL_FunctionTable_Pre, sizeof(DLL_FUNCTIONS)); @@ -24,8 +23,8 @@ C_DLLEXPORT int GetEntityAPI2_Post(DLL_FUNCTIONS* pFunctionTable, int* interface { memset(&gDLL_FunctionTable_Post, 0, sizeof(DLL_FUNCTIONS)); - // Register Functions Here // gDLL_FunctionTable_Post.pfnServerActivate = DLL_POST_ServerActivate; + memcpy(pFunctionTable, &gDLL_FunctionTable_Post, sizeof(DLL_FUNCTIONS)); return 1; diff --git a/AccuracyFix/MetaEngine.cpp b/AccuracyFix/MetaEngine.cpp index 4952f04..c37a8bb 100644 --- a/AccuracyFix/MetaEngine.cpp +++ b/AccuracyFix/MetaEngine.cpp @@ -11,8 +11,6 @@ C_DLLEXPORT int GetEngineFunctions(enginefuncs_t* pengfuncsFromEngine, int* inte { memset(&gENGINE_FunctionTable_Pre, 0, sizeof(enginefuncs_t)); - // Register Functions Here // - memcpy(pengfuncsFromEngine, &gENGINE_FunctionTable_Pre, sizeof(enginefuncs_t)); return 1; @@ -24,7 +22,6 @@ C_DLLEXPORT int GetEngineFunctions_Post(enginefuncs_t* pengfuncsFromEngine, int* { memset(&gENGINE_FunctionTable_Post, 0, sizeof(enginefuncs_t)); - // Register Functions Here // gENGINE_FunctionTable_Post.pfnTraceLine = ENGINE_POST_TraceLine; memcpy(pengfuncsFromEngine, &gENGINE_FunctionTable_Post, sizeof(enginefuncs_t));