diff --git a/README.md b/README.md index cac33d7..70639cf 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,24 @@ The metamod core is based on [metamod-p](https://github.com/Bots-United/metamod- * You are welcome to request for any new hooks or server-side features which is not implemented by Sven Co-op team yet. +# What it does ? + +### fallguys.dll (fallguys.so) + +[Documentation](README_FALLGUYS.md) + +### asext.dll (asext.so) + +[Documentation](README_ASEXT.md) + +### ascurl.dll (ascurl.so) + +[Documentation](README_ASCURL.md) + +### asqcvar.dll (asqcvar.so) + +[Documentation](README_ASQCVAR.md) + # Installation 1. Download from [GitHub Release](https://github.com/hzqst/metamod-fallguys/releases), then unzip it. @@ -79,22 +97,4 @@ gamedll_linux "addons/metamod/dlls/metamod.so" 2. `sudo chmod +777 build-all-linux.sh` to make it executable, then `./build-all-linux.sh` -3. Be patient, `metamod.so`, `asext.so` and `fallguys.so` will be generated at `build/addons/metamod/dlls` if no error(s) occours. - -# What it does ? - -### fallguys.dll (fallguys.so) - -[Documentation](README_FALLGUYS.md) - -### asext.dll (asext.so) - -[Documentation](README_ASEXT.md) - -### ascurl.dll (ascurl.so) - -[Documentation](README_ASCURL.md) - -### asqcvar.dll (asqcvar.so) - -[Documentation](README_ASQCVAR.md) \ No newline at end of file +3. Be patient, `metamod.so`, `asext.so` and `fallguys.so` will be generated at `build/addons/metamod/dlls` if no error(s) occours. \ No newline at end of file diff --git a/README_ASEXT.md b/README_ASEXT.md index 1269e7f..ddb9aa7 100644 --- a/README_ASEXT.md +++ b/README_ASEXT.md @@ -8,14 +8,11 @@ You can register your own hooks or methods in Sven Co-op AngelScript engine. // Define this macro in meta_api.cpp IMPORT_ASEXT_API_DEFINE(); +``` +``` // Add the following code in meta_api.cpp->Meta_Attach -`C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */, - META_FUNCTIONS* pFunctionTable, meta_globals_t* pMGlobals, - gamedll_funcs_t* pGamedllFuncs){` - -``` void *asextHandle = NULL; #ifdef _WIN32 @@ -53,7 +50,7 @@ int SC_SERVER_DECL CASEngineFuncs__TestFunc(void* pthis SC_SERVER_DUMMYARG_NOCOM ``` -Now you can call this from game, you will get test = 114514 if registeration works fine : +Now call g_EngineFuncs.TestFunc from angelscript, you will get test = 114514 if the registeration works fine ``` int test = g_EngineFuncs.TestFunc(); diff --git a/asext/include/asext_api.h b/asext/include/asext_api.h index e84968b..cb748c2 100644 --- a/asext/include/asext_api.h +++ b/asext/include/asext_api.h @@ -349,8 +349,7 @@ class CScriptArray int m_ElementTypeId;//24 }; -#define IMPORT_ASEXT_API(asext) \ -IMPORT_FUNCTION_DLSYM(asext, ASEXT_CallHook);\ +#define IMPORT_ASEXT_API(asext) IMPORT_FUNCTION_DLSYM(asext, ASEXT_CallHook);\ IMPORT_FUNCTION_DLSYM(asext, ASEXT_CallCASBaseCallable);\ IMPORT_FUNCTION_DLSYM(asext, ASEXT_RegisterDocInitCallback);\ IMPORT_FUNCTION_DLSYM(asext, ASEXT_RegisterDirInitCallback);\ @@ -368,8 +367,7 @@ IMPORT_FUNCTION_DLSYM(asext, ASEXT_CreateCASFunction);\ IMPORT_FUNCTION_DLSYM(asext, ASEXT_CASRefCountedBaseClass_InternalRelease);\ IMPORT_FUNCTION_DLSYM(asext, ASEXT_CScriptAny_Release); -#define IMPORT_ASEXT_API_DEFINE() \ -IMPORT_FUNCTION_DEFINE(ASEXT_RegisterDocInitCallback);\ +#define IMPORT_ASEXT_API_DEFINE() IMPORT_FUNCTION_DEFINE(ASEXT_RegisterDocInitCallback);\ IMPORT_FUNCTION_DEFINE(ASEXT_RegisterDirInitCallback);\ IMPORT_FUNCTION_DEFINE(ASEXT_RegisterObjectMethod);\ IMPORT_FUNCTION_DEFINE(ASEXT_RegisterObjectBehaviour);\