diff --git a/sourcemm/ISmmAPI.h b/sourcemm/ISmmAPI.h index d581a12..6977128 100644 --- a/sourcemm/ISmmAPI.h +++ b/sourcemm/ISmmAPI.h @@ -360,3 +360,4 @@ public: // Added in 1.6.0 (1:7) */ #endif //_INCLUDE_ISMM_API_H + diff --git a/sourcemm/ISmmPlugin.h b/sourcemm/ISmmPlugin.h index f795e0b..350c7cb 100644 --- a/sourcemm/ISmmPlugin.h +++ b/sourcemm/ISmmPlugin.h @@ -435,3 +435,4 @@ public: } #endif //_INCLUDE_ISMM_PLUGIN_H + diff --git a/sourcemm/Makefile b/sourcemm/Makefile index 7cea117..f713ab2 100644 --- a/sourcemm/Makefile +++ b/sourcemm/Makefile @@ -1,7 +1,7 @@ #(C)2004-2007 SourceMM Development Team # Makefile written by David "BAILOPAN" Anderson -HL2SDK = ../../hl2sdk +HL2SDK = ../../../hl2sdk SMM_ROOT = .. SRCDS = ~/srcds @@ -16,10 +16,9 @@ BINARY = server_i486.so HL2PUB = $(HL2SDK)/public HL2LIB = $(HL2SDK)/linux_sdk -OBJECTS = oslink.cpp util.cpp concommands.cpp CSmmAPI.cpp \ - sourcemm.cpp CPlugin.cpp sourcehook.cpp vsp_listener.cpp +OBJECTS = oslink.cpp metamod_util.cpp metamod.cpp -LINK = $(HL2LIB)/tier1_i486.a vstdlib_i486.so tier0_i486.so -static-libgcc +LINK = -static-libgcc INCLUDE = -I. -I$(HL2PUB) -I$(HL2PUB)/dlls -I$(HL2PUB)/engine -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 \ -I$(HL2PUB)/vstdlib -I$(HL2SDK)/tier1 -I$(SMM_ROOT) -I$(SMM_ROOT)/sourcehook @@ -47,8 +46,6 @@ $(BIN_DIR)/%.o: %.cpp all: mkdir -p $(BIN_DIR) - ln -sf $(SRCDS)/bin/vstdlib_i486.so vstdlib_i486.so - ln -sf $(SRCDS)/bin/tier0_i486.so tier0_i486.so ln -sf $(SMM_ROOT)/sourcehook/sourcehook.cpp sourcehook.cpp $(MAKE) sourcemm rm -rf $(BINARY) diff --git a/sourcemm/metamod.cpp b/sourcemm/metamod.cpp index 82081d4..bd825bf 100644 --- a/sourcemm/metamod.cpp +++ b/sourcemm/metamod.cpp @@ -589,7 +589,7 @@ void InitializeVSP() char engine_path[PATH_SIZE]; char rel_path[PATH_SIZE * 2]; - GetFileOfAddress(engine_factory, engine_file, sizeof(engine_file)); + GetFileOfAddress((void *)engine_factory, engine_file, sizeof(engine_file)); /* Chop off the "engine" file part */ len = strlen(engine_file); diff --git a/sourcemm/oslink.cpp b/sourcemm/oslink.cpp index 470dbf9..d5a5bfa 100644 --- a/sourcemm/oslink.cpp +++ b/sourcemm/oslink.cpp @@ -14,6 +14,7 @@ */ #include "oslink.h" +#include #ifdef __linux #include #include @@ -70,21 +71,19 @@ bool GetFileOfAddress(void *pAddr, char *buffer, size_t maxlength) #if defined __GNUC__ && (__GNUC__ == 3 || __GNUC__ == 4) void * operator new(size_t size) { - return(calloc(1, size)); + return malloc(size); } void * operator new[](size_t size) { - return(calloc(1, size)); + return malloc(size); } void operator delete(void * ptr) { - if(ptr) - free(ptr); + free(ptr); } void operator delete[](void * ptr) { - if(ptr) - free(ptr); + free(ptr); } #endif