diff --git a/dlls/engine/build.sh b/dlls/engine/build.sh index 9505ae74..1878f011 100755 --- a/dlls/engine/build.sh +++ b/dlls/engine/build.sh @@ -3,6 +3,6 @@ rm engine.so #use VexD's optimizations -gcc -static -march=i686 -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -fno-exceptions -fno-rtti -s -Wall -Wno-unknown-pragmas -DOPT_TYPE=\"optimized\" -fPIC -I. -I../metamod/metamod -I../hlsdk/multiplayer/engine -I../hlsdk/multiplayer/common -I../hlsdk/multiplayer/pm_shared -I../hlsdk/multiplayer/dlls -I../hlsdk/multiplayer -I../amxmodx/ -c meta_api.cpp -o meta_api.o +gcc -static -march=i686 -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -fno-exceptions -fno-rtti -s -Wall -Wno-unknown-pragmas -DOPT_TYPE=\"optimized\" -lstdc++ -fPIC -I. -I../metamod/metamod -I../hlsdk/multiplayer/engine -I../hlsdk/multiplayer/common -I../hlsdk/multiplayer/pm_shared -I../hlsdk/multiplayer/dlls -I../hlsdk/multiplayer -I../amxmodx/ -c meta_api.cpp -o meta_api.o gcc -static -march=i686 -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-exceptions -fno-rtti -s -Wall -Wno-unknown-pragmas -DOPT_TYPE=\"optimized\" -shared -ldl -lm -lstdc++ meta_api.o -o engine.so diff --git a/dlls/engine/engine.h b/dlls/engine/engine.h index d90ea420..c98c10c7 100755 --- a/dlls/engine/engine.h +++ b/dlls/engine/engine.h @@ -34,6 +34,8 @@ #define VERSION "0.1" +#include + using namespace std; plugin_info_t Plugin_info = { @@ -677,7 +679,7 @@ private: int writelong; float writeangle; float writecoord; - string writestring; + std::string writestring; int writeentity; argStack *next; }; diff --git a/dlls/engine/meta_api.cpp b/dlls/engine/meta_api.cpp index 327db529..f3226be5 100755 --- a/dlls/engine/meta_api.cpp +++ b/dlls/engine/meta_api.cpp @@ -3004,7 +3004,11 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason) { +#ifdef __linux__ +C_DLLEXPORT void GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) { +#else void WINAPI GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) { +#endif memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t)); gpGlobals = pGlobals; @@ -3198,4 +3202,4 @@ AMX_NATIVE_INFO Engine_Natives[] = { { NULL, NULL } -}; \ No newline at end of file +};