Skip to content

Commit

Permalink
Test Build
Browse files Browse the repository at this point in the history
Test Build
  • Loading branch information
SmileYzn committed Sep 12, 2024
1 parent 24b93a0 commit 9853c4e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions AccuracyFix/AccuracyFix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down Expand Up @@ -109,6 +109,6 @@ void CAccuracyFix::TraceLine(const float* vStart, const float* vEnd, int fNoMons
}
}
}
}*/
}
}

8 changes: 5 additions & 3 deletions AccuracyFix/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down
3 changes: 1 addition & 2 deletions AccuracyFix/MetaDLL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand All @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions AccuracyFix/MetaEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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));
Expand Down

0 comments on commit 9853c4e

Please sign in to comment.