Updated all module SDKs to stop the most annoying issue ever: amxxmodule.h required size_t but did not include stddef.h
Also stopped dodfun, dodx, tfcx and tsx from loading on games other than the ones they are designed for.
This commit is contained in:
@ -2548,6 +2548,14 @@ C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo
|
||||
// request optional function
|
||||
#define REQFUNC_OPT(name, fptr, type) fptr = (type)reqFnptrFunc(name)
|
||||
|
||||
C_DLLEXPORT int AMXX_CheckGame(const char *game)
|
||||
{
|
||||
#ifdef FN_AMXX_CHECKGAME
|
||||
return FN_AMXX_CHECKGAME(game);
|
||||
#else
|
||||
return AMXX_GAME_OK;
|
||||
#endif
|
||||
}
|
||||
C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
|
||||
{
|
||||
// Check pointer
|
||||
|
@ -10,6 +10,7 @@
|
||||
// config
|
||||
#include "moduleconfig.h"
|
||||
|
||||
#include <stddef.h> // size_t
|
||||
// metamod include files
|
||||
#ifdef USE_METAMOD
|
||||
#include <extdll.h>
|
||||
@ -55,6 +56,9 @@ struct amxx_module_info_s
|
||||
#define AMXX_PARAM 2 /* Invalid parameter */
|
||||
#define AMXX_FUNC_NOT_PRESENT 3 /* Function not present */
|
||||
|
||||
#define AMXX_GAME_OK 0 /* This module can load on the current game mod. */
|
||||
#define AMXX_GAME_BAD 1 /* This module can not load on the current game mod. */
|
||||
|
||||
// *** Small stuff ***
|
||||
// The next section is copied from the amx.h file
|
||||
// Copyright (c) ITB CompuPhase, 1997-2005
|
||||
@ -2023,6 +2027,10 @@ int FN_ShouldCollide_Post(edict_t *pentTouched, edict_t *pentOther);
|
||||
void FN_AMXX_QUERY(void);
|
||||
#endif // FN_AMXX_QUERY
|
||||
|
||||
#ifdef FN_AMXX_CHECKGAME
|
||||
int FN_AMXX_CHECKGAME(const char *);
|
||||
#endif // FN_AMXX_CHECKGAME
|
||||
|
||||
#ifdef FN_AMXX_ATTACH
|
||||
void FN_AMXX_ATTACH(void);
|
||||
#endif // FN_AMXX_ATTACH
|
||||
|
Reference in New Issue
Block a user