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:
parent
3ff4f675d0
commit
76f64ff95d
@ -9,7 +9,7 @@ OBJECTS = *.cpp
|
||||
|
||||
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 \
|
||||
-I$(HLSDK)/game_shared -I$(HLSDK)/pm_shared -I$(HLSDK)/public -I$(METAMOD)
|
||||
|
@ -1,9 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __GNUC__
|
||||
enum class sv_delta_s;
|
||||
#endif
|
||||
|
||||
#include <rehlds_api.h>
|
||||
|
||||
extern IRehldsApi* g_RehldsApi;
|
||||
@ -11,4 +7,4 @@ extern const RehldsFuncs_t* g_RehldsFuncs;
|
||||
extern IRehldsHookchains* g_RehldsHookchains;
|
||||
extern IRehldsServerStatic* g_RehldsSvs;
|
||||
|
||||
extern bool ex_init_rehlds_api();
|
||||
extern bool meta_init_rehlds_api();
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <extdll.h>
|
||||
#include <meta_api.h>
|
||||
#include "ex_rehlds_api.h"
|
||||
|
||||
meta_globals_t *gpMetaGlobals;
|
||||
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");
|
||||
|
||||
if (meta_init_rehlds_api())
|
||||
g_engfuncs.pfnServerPrint("ReHLDS API successfully initialized.\n");
|
||||
|
||||
memcpy(pFunctionTable, &gMetaFunctionTable, sizeof(META_FUNCTIONS));
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user