2
0
mirror of https://github.com/rehlds/metamod-r.git synced 2024-12-27 07:05:34 +03:00

Fix example plugin compilation

This commit is contained in:
Asmodai 2018-01-26 19:21:37 +03:00
parent 3ff4f675d0
commit 76f64ff95d
3 changed files with 6 additions and 6 deletions

View File

@ -9,7 +9,7 @@ OBJECTS = *.cpp
LINK = LINK =
OPT_FLAGS = -O3 -msse3 -flto -funroll-loops -fomit-frame-pointer -fno-stack-protector OPT_FLAGS = -O3 -msse3 -flto -funroll-loops -fomit-frame-pointer -fno-stack-protector -fPIC
INCLUDE = -I. -I$(HLSDK)/common -I$(HLSDK)/dlls -I$(HLSDK)/engine \ INCLUDE = -I. -I$(HLSDK)/common -I$(HLSDK)/dlls -I$(HLSDK)/engine \
-I$(HLSDK)/game_shared -I$(HLSDK)/pm_shared -I$(HLSDK)/public -I$(METAMOD) -I$(HLSDK)/game_shared -I$(HLSDK)/pm_shared -I$(HLSDK)/public -I$(METAMOD)

View File

@ -1,9 +1,5 @@
#pragma once #pragma once
#ifdef __GNUC__
enum class sv_delta_s;
#endif
#include <rehlds_api.h> #include <rehlds_api.h>
extern IRehldsApi* g_RehldsApi; extern IRehldsApi* g_RehldsApi;
@ -11,4 +7,4 @@ extern const RehldsFuncs_t* g_RehldsFuncs;
extern IRehldsHookchains* g_RehldsHookchains; extern IRehldsHookchains* g_RehldsHookchains;
extern IRehldsServerStatic* g_RehldsSvs; extern IRehldsServerStatic* g_RehldsSvs;
extern bool ex_init_rehlds_api(); extern bool meta_init_rehlds_api();

View File

@ -1,5 +1,6 @@
#include <extdll.h> #include <extdll.h>
#include <meta_api.h> #include <meta_api.h>
#include "ex_rehlds_api.h"
meta_globals_t *gpMetaGlobals; meta_globals_t *gpMetaGlobals;
gamedll_funcs_t *gpGamedllFuncs; gamedll_funcs_t *gpGamedllFuncs;
@ -45,6 +46,9 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME now, META_FUNCTIONS *pFunctionTable, m
g_engfuncs.pfnServerPrint("\n################\n# Hello World! #\n################\n\n"); g_engfuncs.pfnServerPrint("\n################\n# Hello World! #\n################\n\n");
if (meta_init_rehlds_api())
g_engfuncs.pfnServerPrint("ReHLDS API successfully initialized.\n");
memcpy(pFunctionTable, &gMetaFunctionTable, sizeof(META_FUNCTIONS)); memcpy(pFunctionTable, &gMetaFunctionTable, sizeof(META_FUNCTIONS));
return TRUE; return TRUE;
} }