Removed un-needed calls
Added a few more calls (over 50% are done!)
This commit is contained in:
parent
9d3ffda996
commit
2c4be26756
|
@ -103,14 +103,10 @@ void OnPluginsLoaded()
|
||||||
RESETE(SetGroupMask);
|
RESETE(SetGroupMask);
|
||||||
RESETE(Voice_GetClientListening);
|
RESETE(Voice_GetClientListening);
|
||||||
RESETE(Voice_SetClientListening);
|
RESETE(Voice_SetClientListening);
|
||||||
RESETE(MessageBegin);
|
|
||||||
RESETE(WriteCoord);
|
|
||||||
RESETE(WriteAngle);
|
|
||||||
RESETE(InfoKeyValue);
|
RESETE(InfoKeyValue);
|
||||||
RESETE(SetKeyValue);
|
RESETE(SetKeyValue);
|
||||||
RESETE(SetClientKeyValue);
|
RESETE(SetClientKeyValue);
|
||||||
|
|
||||||
RESETD(GameInit);
|
|
||||||
RESETD(Spawn);
|
RESETD(Spawn);
|
||||||
RESETD(Think);
|
RESETD(Think);
|
||||||
RESETD(Use);
|
RESETD(Use);
|
||||||
|
|
|
@ -12,162 +12,7 @@ const char *mlStringResult;
|
||||||
int retType = 0;
|
int retType = 0;
|
||||||
int lastFmRes = FMRES_IGNORED;
|
int lastFmRes = FMRES_IGNORED;
|
||||||
|
|
||||||
#define SIMPLE_INT_HOOK_STRING(call) \
|
#include "forwardmacros.h"
|
||||||
int call (char *s) \
|
|
||||||
{ \
|
|
||||||
FM_ENG_HANDLE(FM_##call, (Engine[FM_##call].at(i), s)); \
|
|
||||||
RETURN_META_VALUE(mswi(lastFmRes), (int)mlCellResult); \
|
|
||||||
} \
|
|
||||||
int call##_post (char *s) \
|
|
||||||
{ \
|
|
||||||
FM_ENG_HANDLE_POST(FM_##call, (EnginePost[FM_##call].at(i), s)); \
|
|
||||||
RETURN_META_VALUE(MRES_IGNORED, (int)mlCellResult); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define SIMPLE_INT_HOOK_CONSTSTRING(call) \
|
|
||||||
int call (const char *s) \
|
|
||||||
{ \
|
|
||||||
FM_ENG_HANDLE(FM_##call, (Engine[FM_##call].at(i), s)); \
|
|
||||||
RETURN_META_VALUE(mswi(lastFmRes), (int)mlCellResult); \
|
|
||||||
} \
|
|
||||||
int call##_post (const char *s) \
|
|
||||||
{ \
|
|
||||||
FM_ENG_HANDLE_POST(FM_##call, (EnginePost[FM_##call].at(i), s)); \
|
|
||||||
RETURN_META_VALUE(MRES_IGNORED, (int)mlCellResult); \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#define SIMPLE_VOID_HOOK_EDICT(call) \
|
|
||||||
void call (edict_t *ent) \
|
|
||||||
{ \
|
|
||||||
FM_ENG_HANDLE(FM_##call, (Engine[FM_##call].at(i), ENTINDEX(ent))); \
|
|
||||||
RETURN_META(mswi(lastFmRes)); \
|
|
||||||
} \
|
|
||||||
void call##_post (edict_t *ent) \
|
|
||||||
{ \
|
|
||||||
FM_ENG_HANDLE_POST(FM_##call, (EnginePost[FM_##call].at(i), ENTINDEX(ent))); \
|
|
||||||
RETURN_META(MRES_IGNORED); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define SIMPLE_VOID_HOOK_EDICT_EDICT(call) \
|
|
||||||
void call (edict_t *ent,edict_t *entb) \
|
|
||||||
{ \
|
|
||||||
FM_ENG_HANDLE(FM_##call, (Engine[FM_##call].at(i), ENTINDEX(ent), ENTINDEX(entb))); \
|
|
||||||
RETURN_META(mswi(lastFmRes)); \
|
|
||||||
} \
|
|
||||||
void call##_post (edict_t *ent,edict_t *entb) \
|
|
||||||
{ \
|
|
||||||
FM_ENG_HANDLE_POST(FM_##call, (EnginePost[FM_##call].at(i), ENTINDEX(ent), ENTINDEX(entb))); \
|
|
||||||
RETURN_META(MRES_IGNORED); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define SIMPLE_VOID_HOOK_VOID(call) \
|
|
||||||
void call (void) \
|
|
||||||
{ \
|
|
||||||
FM_ENG_HANDLE(FM_##call, (Engine[FM_##call].at(i))); \
|
|
||||||
RETURN_META(mswi(lastFmRes)); \
|
|
||||||
} \
|
|
||||||
void call##_post (void) \
|
|
||||||
{ \
|
|
||||||
FM_ENG_HANDLE_POST(FM_##call, (EnginePost[FM_##call].at(i))); \
|
|
||||||
RETURN_META(MRES_IGNORED); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define SIMPLE_INT_HOOK_EDICT(call) \
|
|
||||||
int call (edict_t *pent) \
|
|
||||||
{ \
|
|
||||||
FM_ENG_HANDLE(FM_##call, (Engine[FM_##call].at(i), ENTINDEX(pent))); \
|
|
||||||
RETURN_META_VALUE(mswi(lastFmRes), (int)mlCellResult); \
|
|
||||||
} \
|
|
||||||
int call##_post (edict_t *pent) \
|
|
||||||
{ \
|
|
||||||
FM_ENG_HANDLE_POST(FM_##call, (EnginePost[FM_##call].at(i), ENTINDEX(pent))); \
|
|
||||||
RETURN_META_VALUE(MRES_IGNORED, (int)mlCellResult); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define SIMPLE_INT_HOOK_INT(call) \
|
|
||||||
int call (int v) \
|
|
||||||
{ \
|
|
||||||
FM_ENG_HANDLE(FM_##call, (Engine[FM_##call].at(i), v)); \
|
|
||||||
RETURN_META_VALUE(mswi(lastFmRes), (int)mlCellResult); \
|
|
||||||
} \
|
|
||||||
int call##_post (int v) \
|
|
||||||
{ \
|
|
||||||
FM_ENG_HANDLE_POST(FM_##call, (EnginePost[FM_##call].at(i), v)); \
|
|
||||||
RETURN_META_VALUE(MRES_IGNORED, (int)mlCellResult); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define SIMPLE_INT_HOOK_VOID(call) \
|
|
||||||
int call () \
|
|
||||||
{ \
|
|
||||||
FM_ENG_HANDLE(FM_##call, (Engine[FM_##call].at(i))); \
|
|
||||||
RETURN_META_VALUE(mswi(lastFmRes), (int)mlCellResult); \
|
|
||||||
} \
|
|
||||||
int call##_post () \
|
|
||||||
{ \
|
|
||||||
FM_ENG_HANDLE_POST(FM_##call, (EnginePost[FM_##call].at(i))); \
|
|
||||||
RETURN_META_VALUE(MRES_IGNORED, (int)mlCellResult); \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#define ENGHOOK(pfnCall) \
|
|
||||||
if (post) \
|
|
||||||
{ \
|
|
||||||
if (engtable->pfn##pfnCall == NULL) \
|
|
||||||
engtable->pfn##pfnCall = pfnCall##_post; \
|
|
||||||
} \
|
|
||||||
else \
|
|
||||||
{ \
|
|
||||||
if (engtable->pfn##pfnCall == NULL) \
|
|
||||||
engtable->pfn##pfnCall = pfnCall; \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define DLLHOOK(pfnCall) \
|
|
||||||
if (post) \
|
|
||||||
{ \
|
|
||||||
if (dlltable->pfn##pfnCall == NULL) \
|
|
||||||
dlltable->pfn##pfnCall = pfnCall##_post; \
|
|
||||||
} \
|
|
||||||
else \
|
|
||||||
{ \
|
|
||||||
if (dlltable->pfn##pfnCall == NULL) \
|
|
||||||
dlltable->pfn##pfnCall = pfnCall; \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define FM_ENG_HANDLE(pfnCall, pfnArgs) \
|
|
||||||
register unsigned int i = 0; \
|
|
||||||
clfm(); \
|
|
||||||
int fmres = FMRES_IGNORED; \
|
|
||||||
for (i=0; i<Engine[pfnCall].size(); i++) \
|
|
||||||
{ \
|
|
||||||
fmres = MF_ExecuteForward pfnArgs; \
|
|
||||||
if (fmres >= lastFmRes) { \
|
|
||||||
if (retType == FMV_STRING) \
|
|
||||||
mlStringResult = mStringResult; \
|
|
||||||
else if (retType == FMV_CELL) \
|
|
||||||
mlCellResult = mCellResult; \
|
|
||||||
else if (retType == FMV_FLOAT) \
|
|
||||||
mlFloatResult = mFloatResult; \
|
|
||||||
lastFmRes = fmres; \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
#define FM_ENG_HANDLE_POST(pfnCall, pfnArgs) \
|
|
||||||
register unsigned int i = 0; \
|
|
||||||
clfm(); \
|
|
||||||
int fmres = FMRES_IGNORED; \
|
|
||||||
for (i=0; i<EnginePost[pfnCall].size(); i++) \
|
|
||||||
{ \
|
|
||||||
fmres = MF_ExecuteForward pfnArgs; \
|
|
||||||
if (fmres >= lastFmRes) { \
|
|
||||||
if (retType == FMV_STRING) \
|
|
||||||
mlStringResult = mStringResult; \
|
|
||||||
else if (retType == FMV_CELL) \
|
|
||||||
mlCellResult = mCellResult; \
|
|
||||||
else if (retType == FMV_FLOAT) \
|
|
||||||
mlFloatResult = mFloatResult; \
|
|
||||||
lastFmRes = fmres; \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
META_RES mswi(int fmres)
|
META_RES mswi(int fmres)
|
||||||
{
|
{
|
||||||
|
@ -347,9 +192,15 @@ SIMPLE_VOID_HOOK_EDICT(ChangeYaw);
|
||||||
// pfnChangePitch
|
// pfnChangePitch
|
||||||
SIMPLE_VOID_HOOK_EDICT(ChangePitch);
|
SIMPLE_VOID_HOOK_EDICT(ChangePitch);
|
||||||
|
|
||||||
|
// pfnCreateEntity
|
||||||
|
SIMPLE_EDICT_HOOK_VOID(CreateEntity);
|
||||||
|
|
||||||
// pfnRemoveEntity
|
// pfnRemoveEntity
|
||||||
SIMPLE_VOID_HOOK_EDICT(RemoveEntity);
|
SIMPLE_VOID_HOOK_EDICT(RemoveEntity);
|
||||||
|
|
||||||
|
// pfnCreateNamedEntity
|
||||||
|
SIMPLE_EDICT_HOOK_INT(CreateNamedEntity);
|
||||||
|
|
||||||
// pfnMakeStatic
|
// pfnMakeStatic
|
||||||
SIMPLE_VOID_HOOK_EDICT(MakeStatic);
|
SIMPLE_VOID_HOOK_EDICT(MakeStatic);
|
||||||
|
|
||||||
|
@ -359,10 +210,23 @@ SIMPLE_INT_HOOK_EDICT(EntIsOnFloor);
|
||||||
// pfnDropToFloor
|
// pfnDropToFloor
|
||||||
SIMPLE_INT_HOOK_EDICT(DropToFloor);
|
SIMPLE_INT_HOOK_EDICT(DropToFloor);
|
||||||
|
|
||||||
|
// pfnDecalIndex
|
||||||
|
SIMPLE_INT_HOOK_CONSTSTRING(DecalIndex);
|
||||||
|
|
||||||
|
// pfnFreeEntPrivateData
|
||||||
|
SIMPLE_VOID_HOOK_EDICT(FreeEntPrivateData);
|
||||||
|
|
||||||
|
// pfnAllocString
|
||||||
|
SIMPLE_INT_HOOK_CONSTSTRING(AllocString);
|
||||||
|
|
||||||
|
// pfnPrecacheGeneric
|
||||||
|
SIMPLE_INT_HOOK_STRING(PrecacheGeneric);
|
||||||
|
|
||||||
// pfnNumberOfEntities
|
// pfnNumberOfEntities
|
||||||
SIMPLE_INT_HOOK_VOID(NumberOfEntities);
|
SIMPLE_INT_HOOK_VOID(NumberOfEntities);
|
||||||
|
|
||||||
|
// pfnGetCurrentPlayer
|
||||||
|
SIMPLE_INT_HOOK_VOID(GetCurrentPlayer);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Beginning of Game DLL hooks
|
* Beginning of Game DLL hooks
|
||||||
|
@ -416,6 +280,9 @@ SIMPLE_VOID_HOOK_VOID(ParmsNewLevel);
|
||||||
// pfnParmsChangeLevel
|
// pfnParmsChangeLevel
|
||||||
SIMPLE_VOID_HOOK_VOID(ParmsChangeLevel);
|
SIMPLE_VOID_HOOK_VOID(ParmsChangeLevel);
|
||||||
|
|
||||||
|
// pfnGetGameDescription
|
||||||
|
SIMPLE_CONSTSTRING_HOOK_VOID(GetGameDescription);
|
||||||
|
|
||||||
// pfnSpectatorConnect
|
// pfnSpectatorConnect
|
||||||
SIMPLE_VOID_HOOK_EDICT(SpectatorConnect);
|
SIMPLE_VOID_HOOK_EDICT(SpectatorConnect);
|
||||||
|
|
||||||
|
@ -425,11 +292,29 @@ SIMPLE_VOID_HOOK_EDICT(SpectatorDisconnect);
|
||||||
// pfnSpectatorThink
|
// pfnSpectatorThink
|
||||||
SIMPLE_VOID_HOOK_EDICT(SpectatorThink);
|
SIMPLE_VOID_HOOK_EDICT(SpectatorThink);
|
||||||
|
|
||||||
|
// pfnSys_Error
|
||||||
|
SIMPLE_VOID_HOOK_CONSTSTRING(Sys_Error);
|
||||||
|
|
||||||
|
// pfnPM_FindTextureType
|
||||||
|
SIMPLE_CHAR_HOOK_STRING(PM_FindTextureType);
|
||||||
|
|
||||||
|
// pfnRegisterEncoders
|
||||||
|
SIMPLE_VOID_HOOK_VOID(RegisterEncoders);
|
||||||
|
|
||||||
// pfnCreateInstancedBaselines
|
// pfnCreateInstancedBaselines
|
||||||
SIMPLE_VOID_HOOK_VOID(CreateInstancedBaselines);
|
SIMPLE_VOID_HOOK_VOID(CreateInstancedBaselines);
|
||||||
|
|
||||||
// pfnAllowLagCompensation
|
// pfnAllowLagCompensation
|
||||||
SIMPLE_INT_HOOK_VOID(AllowLagCompensation);
|
SIMPLE_INT_HOOK_VOID(AllowLagCompensation);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int func = params[1];
|
int func = params[1];
|
||||||
|
@ -534,6 +419,7 @@ static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params)
|
||||||
break;
|
break;
|
||||||
case FM_CreateEntity:
|
case FM_CreateEntity:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
|
||||||
|
ENGHOOK(CreateEntity);
|
||||||
break;
|
break;
|
||||||
case FM_RemoveEntity:
|
case FM_RemoveEntity:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
|
||||||
|
@ -541,6 +427,7 @@ static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params)
|
||||||
break;
|
break;
|
||||||
case FM_CreateNamedEntity:
|
case FM_CreateNamedEntity:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
||||||
|
ENGHOOK(CreateNamedEntity);
|
||||||
break;
|
break;
|
||||||
case FM_MakeStatic:
|
case FM_MakeStatic:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
|
||||||
|
@ -598,18 +485,21 @@ static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params)
|
||||||
break;
|
break;
|
||||||
case FM_DecalIndex:
|
case FM_DecalIndex:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
||||||
|
ENGHOOK(DecalIndex);
|
||||||
break;
|
break;
|
||||||
case FM_PointContents:
|
case FM_PointContents:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_ARRAY, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_ARRAY, FP_DONE);
|
||||||
break;
|
break;
|
||||||
case FM_FreeEntPrivateData:
|
case FM_FreeEntPrivateData:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_ARRAY, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_ARRAY, FP_DONE);
|
||||||
|
ENGHOOK(FreeEntPrivateData);
|
||||||
break;
|
break;
|
||||||
case FM_SzFromIndex:
|
case FM_SzFromIndex:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
||||||
break;
|
break;
|
||||||
case FM_AllocString:
|
case FM_AllocString:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
||||||
|
ENGHOOK(AllocString);
|
||||||
break;
|
break;
|
||||||
case FM_RegUserMsg:
|
case FM_RegUserMsg:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_CELL, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_CELL, FP_DONE);
|
||||||
|
@ -653,6 +543,7 @@ static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params)
|
||||||
break;
|
break;
|
||||||
case FM_PrecacheGeneric:
|
case FM_PrecacheGeneric:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
||||||
|
ENGHOOK(PrecacheGeneric);
|
||||||
break;
|
break;
|
||||||
case FM_BuildSoundMsg:
|
case FM_BuildSoundMsg:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_STRING, FP_FLOAT, FP_FLOAT, FP_CELL, FP_CELL, FP_CELL, FP_CELL, FP_ARRAY, FP_CELL, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_STRING, FP_FLOAT, FP_FLOAT, FP_CELL, FP_CELL, FP_CELL, FP_CELL, FP_ARRAY, FP_CELL, FP_DONE);
|
||||||
|
@ -679,6 +570,7 @@ static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params)
|
||||||
//EngFunc_GetCurrentPlayer, //) ( void );
|
//EngFunc_GetCurrentPlayer, //) ( void );
|
||||||
case FM_GetCurrentPlayer:
|
case FM_GetCurrentPlayer:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
|
||||||
|
ENGHOOK(GetCurrentPlayer);
|
||||||
break;
|
break;
|
||||||
//EngFunc_CanSkipPlayer, //) ( const edict_t *player );
|
//EngFunc_CanSkipPlayer, //) ( const edict_t *player );
|
||||||
case FM_CanSkipPlayer:
|
case FM_CanSkipPlayer:
|
||||||
|
@ -696,18 +588,6 @@ static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params)
|
||||||
case FM_Voice_SetClientListening:
|
case FM_Voice_SetClientListening:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_CELL, FP_DONE); // TODO: bool as cell 3rd arg?
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_CELL, FP_DONE); // TODO: bool as cell 3rd arg?
|
||||||
break;
|
break;
|
||||||
//EngFunc_MessageBegin, // void (int msg_dest, int msg_type, const float *pOrigin, edict_t *ed)
|
|
||||||
case FM_MessageBegin:
|
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_CELL, FP_ARRAY, FP_CELL, FP_DONE);
|
|
||||||
break;
|
|
||||||
//EngFunc_WriteCoord, // void (float)
|
|
||||||
case FM_WriteCoord:
|
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_FLOAT, FP_DONE);
|
|
||||||
break;
|
|
||||||
//EngFunc_WriteAngle, // void (float)
|
|
||||||
case FM_WriteAngle:
|
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_FLOAT, FP_DONE);
|
|
||||||
break;
|
|
||||||
//EngFunc_InfoKeyValue, // char* ) (char *infobuffer, char *key);
|
//EngFunc_InfoKeyValue, // char* ) (char *infobuffer, char *key);
|
||||||
case FM_InfoKeyValue:
|
case FM_InfoKeyValue:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_STRING, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_STRING, FP_DONE);
|
||||||
|
@ -725,10 +605,6 @@ static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params)
|
||||||
/*
|
/*
|
||||||
* Begin of DLLFuncs
|
* Begin of DLLFuncs
|
||||||
*/
|
*/
|
||||||
//DLLFunc_GameInit, // void) ( void );
|
|
||||||
case FM_GameInit:
|
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
|
|
||||||
break;
|
|
||||||
//DLLFunc_Spawn, // int ) ( edict_t *pent );
|
//DLLFunc_Spawn, // int ) ( edict_t *pent );
|
||||||
case FM_Spawn:
|
case FM_Spawn:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_CELL, FP_DONE);
|
||||||
|
@ -828,6 +704,7 @@ static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params)
|
||||||
//DLLFunc_GetGameDescription, // const char * )( void );
|
//DLLFunc_GetGameDescription, // const char * )( void );
|
||||||
case FM_GetGameDescription:
|
case FM_GetGameDescription:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
|
||||||
|
DLLHOOK(GetGameDescription);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Spectator funcs
|
// Spectator funcs
|
||||||
|
@ -851,15 +728,18 @@ static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params)
|
||||||
//DLLFunc_Sys_Error, // void ) ( const char *error_string );
|
//DLLFunc_Sys_Error, // void ) ( const char *error_string );
|
||||||
case FM_Sys_Error:
|
case FM_Sys_Error:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
||||||
|
DLLHOOK(Sys_Error);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//DLLFunc_PM_FindTextureType, // char )( char *name );
|
//DLLFunc_PM_FindTextureType, // char )( char *name );
|
||||||
case FM_PM_FindTextureType:
|
case FM_PM_FindTextureType:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_STRING, FP_DONE);
|
||||||
|
DLLHOOK(PM_FindTextureType);
|
||||||
break;
|
break;
|
||||||
//DLLFunc_RegisterEncoders, // void ) ( void );
|
//DLLFunc_RegisterEncoders, // void ) ( void );
|
||||||
case FM_RegisterEncoders:
|
case FM_RegisterEncoders:
|
||||||
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
|
fId = MF_RegisterSPForwardByName(amx, funcname, FP_DONE);
|
||||||
|
DLLHOOK(RegisterEncoders);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Enumerates player hulls. Returns 0 if the hull number doesn't exist, 1 otherwise
|
// Enumerates player hulls. Returns 0 if the hull number doesn't exist, 1 otherwise
|
||||||
|
|
|
@ -13,31 +13,31 @@
|
||||||
#define FMRES_OVERRIDE 3
|
#define FMRES_OVERRIDE 3
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
FM_PrecacheModel = 1, // int ) (char* s);
|
FM_PrecacheModel = 1, // done
|
||||||
FM_PrecacheSound, // int ) (char* s);
|
FM_PrecacheSound, // done
|
||||||
FM_SetModel, // void ) (edict_t *e, const char *m);
|
FM_SetModel, // done
|
||||||
FM_ModelIndex, // int ) (const char *m);
|
FM_ModelIndex, // done
|
||||||
FM_ModelFrames, // int ) (int modelIndex);
|
FM_ModelFrames, // done
|
||||||
FM_SetSize, // void ) (edict_t *e, const float *rgflMin, const float *rgflMax);
|
FM_SetSize, // done
|
||||||
FM_ChangeLevel, // void ) (char* s1, char* s2);
|
FM_ChangeLevel, // done
|
||||||
FM_VecToYaw, // float) (const float *rgflVector);
|
FM_VecToYaw, // done
|
||||||
FM_VecToAngles, // void ) (const float *rgflVectorIn, float *rgflVectorOut);
|
FM_VecToAngles, // done
|
||||||
FM_MoveToOrigin, // void ) (edict_t *ent, const float *pflGoal, float dist, int iMoveType);
|
FM_MoveToOrigin, // done
|
||||||
FM_ChangeYaw, // void ) (edict_t* ent);
|
FM_ChangeYaw, // done
|
||||||
FM_ChangePitch, // void ) (edict_t* ent);
|
FM_ChangePitch, // done
|
||||||
FM_FindEntityByString, // edict) (edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue);
|
FM_FindEntityByString, // done
|
||||||
FM_GetEntityIllum, // int ) (edict_t* pEnt);
|
FM_GetEntityIllum, // done
|
||||||
FM_FindEntityInSphere, // edict) (edict_t *pEdictStartSearchAfter, const float *org, float rad);
|
FM_FindEntityInSphere, // edict) (edict_t *pEdictStartSearchAfter, const float *org, float rad);
|
||||||
FM_FindClientInPVS, // edict) (edict_t *pEdict);
|
FM_FindClientInPVS, // edict) (edict_t *pEdict);
|
||||||
FM_EntitiesInPVS, // edict) (edict_t *pplayer);
|
FM_EntitiesInPVS, // edict) (edict_t *pplayer);
|
||||||
FM_MakeVectors, // void ) (const float *rgflVector);
|
FM_MakeVectors, // void ) (const float *rgflVector);
|
||||||
FM_AngleVectors, // void ) (const float *rgflVector, float *forward, float *right, float *up);
|
FM_AngleVectors, // void ) (const float *rgflVector, float *forward, float *right, float *up);
|
||||||
FM_CreateEntity, // edict) (void);
|
FM_CreateEntity, // done
|
||||||
FM_RemoveEntity, // void ) (edict_t* e);
|
FM_RemoveEntity, // done
|
||||||
FM_CreateNamedEntity, // edict) (int className);
|
FM_CreateNamedEntity, // done
|
||||||
FM_MakeStatic, // void ) (edict_t *ent);
|
FM_MakeStatic, // done
|
||||||
FM_EntIsOnFloor, // int ) (edict_t *e);
|
FM_EntIsOnFloor, // done
|
||||||
FM_DropToFloor, // int ) (edict_t* e);
|
FM_DropToFloor, // done
|
||||||
FM_WalkMove, // int ) (edict_t *ent, float yaw, float dist, int iMode);
|
FM_WalkMove, // int ) (edict_t *ent, float yaw, float dist, int iMode);
|
||||||
FM_SetOrigin, // void ) (edict_t *e, const float *rgflOrigin);
|
FM_SetOrigin, // void ) (edict_t *e, const float *rgflOrigin);
|
||||||
FM_EmitSound, // void ) (edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch);
|
FM_EmitSound, // void ) (edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch);
|
||||||
|
@ -52,11 +52,11 @@ enum {
|
||||||
FM_GetAimVector, // void ) (edict_t* ent, float speed, float *rgflReturn);
|
FM_GetAimVector, // void ) (edict_t* ent, float speed, float *rgflReturn);
|
||||||
FM_ParticleEffect, // void ) (const float *org, const float *dir, float color, float count);
|
FM_ParticleEffect, // void ) (const float *org, const float *dir, float color, float count);
|
||||||
FM_LightStyle, // void ) (int style, char* val);
|
FM_LightStyle, // void ) (int style, char* val);
|
||||||
FM_DecalIndex, // int ) (const char *name);
|
FM_DecalIndex, // done
|
||||||
FM_PointContents, // int ) (const float *rgflVector);
|
FM_PointContents, // int ) (const float *rgflVector);
|
||||||
FM_FreeEntPrivateData, // void ) (edict_t *pEdict);
|
FM_FreeEntPrivateData, // done
|
||||||
FM_SzFromIndex, // const char * ) (int iString);
|
FM_SzFromIndex, // const char * ) (int iString);
|
||||||
FM_AllocString, // int ) (const char *szValue);
|
FM_AllocString, // done
|
||||||
FM_RegUserMsg, // int ) (const char *pszName, int iSize);
|
FM_RegUserMsg, // int ) (const char *pszName, int iSize);
|
||||||
FM_AnimationAutomove, // void ) (const edict_t* pEdict, float flTime);
|
FM_AnimationAutomove, // void ) (const edict_t* pEdict, float flTime);
|
||||||
FM_GetBonePosition, // void ) (const edict_t* pEdict, int iBone, float *rgflOrigin, float *rgflAngles );
|
FM_GetBonePosition, // void ) (const edict_t* pEdict, int iBone, float *rgflOrigin, float *rgflAngles );
|
||||||
|
@ -68,9 +68,9 @@ enum {
|
||||||
FM_SetClientMaxspeed, // void ) (const edict_t *pEdict, float fNewMaxspeed);
|
FM_SetClientMaxspeed, // void ) (const edict_t *pEdict, float fNewMaxspeed);
|
||||||
FM_CreateFakeClient, // edict) (const char *netname); // returns NULL if fake client can't be created
|
FM_CreateFakeClient, // edict) (const char *netname); // returns NULL if fake client can't be created
|
||||||
FM_RunPlayerMove, // void ) (edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec );
|
FM_RunPlayerMove, // void ) (edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec );
|
||||||
FM_NumberOfEntities, // int ) (void);
|
FM_NumberOfEntities, // done
|
||||||
FM_StaticDecal, // void ) ( const float *origin, int decalIndex, int entityIndex, int modelIndex );
|
FM_StaticDecal, // void ) ( const float *origin, int decalIndex, int entityIndex, int modelIndex );
|
||||||
FM_PrecacheGeneric, // int ) (char* s);
|
FM_PrecacheGeneric, // done
|
||||||
FM_BuildSoundMsg, // void ) (edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch, int msg_dest, int msg_type, const float *pOrigin, edict_t *ed);
|
FM_BuildSoundMsg, // void ) (edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch, int msg_dest, int msg_type, const float *pOrigin, edict_t *ed);
|
||||||
FM_GetPhysicsKeyValue, // const char* ) ( const edict_t *pClient, const char *key );
|
FM_GetPhysicsKeyValue, // const char* ) ( const edict_t *pClient, const char *key );
|
||||||
FM_SetPhysicsKeyValue, // void ) ( const edict_t *pClient, const char *key, const char *value );
|
FM_SetPhysicsKeyValue, // void ) ( const edict_t *pClient, const char *key, const char *value );
|
||||||
|
@ -83,59 +83,56 @@ enum {
|
||||||
FM_SetGroupMask, //) ( int mask, int op );
|
FM_SetGroupMask, //) ( int mask, int op );
|
||||||
FM_Voice_GetClientListening, // bool (int iReceiver, int iSender)
|
FM_Voice_GetClientListening, // bool (int iReceiver, int iSender)
|
||||||
FM_Voice_SetClientListening, // bool (int iReceiver, int iSender, bool Listen)
|
FM_Voice_SetClientListening, // bool (int iReceiver, int iSender, bool Listen)
|
||||||
FM_MessageBegin, // void (int msg_dest, int msg_type, const float *pOrigin, edict_t *ed)
|
|
||||||
FM_WriteCoord, // void (float)
|
|
||||||
FM_WriteAngle, // void (float)
|
|
||||||
FM_InfoKeyValue, // char* ) (char *infobuffer, char *key);
|
FM_InfoKeyValue, // char* ) (char *infobuffer, char *key);
|
||||||
FM_SetKeyValue, // void ) (char *infobuffer, char *key, char *value);
|
FM_SetKeyValue, // void ) (char *infobuffer, char *key, char *value);
|
||||||
FM_SetClientKeyValue, // void ) (int clientIndex, char *infobuffer, char *key, char *value);
|
FM_SetClientKeyValue, // void ) (int clientIndex, char *infobuffer, char *key, char *value);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FM_GameInit, // void) ( void );
|
// FM_GameInit, // Removed -- it will *never* be called after plugins are loaded
|
||||||
FM_Spawn, // int ) ( edict_t *pent );
|
FM_Spawn, // done
|
||||||
FM_Think, // void ) ( edict_t *pent );
|
FM_Think, // done
|
||||||
FM_Use, // void ) ( edict_t *pentUsed, edict_t *pentOther );
|
FM_Use, // done
|
||||||
FM_Touch, // void ) ( edict_t *pentTouched, edict_t *pentOther );
|
FM_Touch, // done
|
||||||
FM_Blocked, // void ) ( edict_t *pentBlocked, edict_t *pentOther );
|
FM_Blocked, // done
|
||||||
FM_KeyValue, // void ) ( edict_t *pentKeyvalue, KeyValueData *pkvd );
|
FM_KeyValue, // void ) ( edict_t *pentKeyvalue, KeyValueData *pkvd );
|
||||||
FM_SetAbsBox, // void ) ( edict_t *pent );
|
FM_SetAbsBox, // done
|
||||||
FM_ClientConnect, // bool) ( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ] );
|
FM_ClientConnect, // bool) ( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ] );
|
||||||
|
|
||||||
FM_ClientDisconnect, // void ) ( edict_t *pEntity );
|
FM_ClientDisconnect, // done
|
||||||
FM_ClientKill, // void ) ( edict_t *pEntity );
|
FM_ClientKill, // done
|
||||||
FM_ClientPutInServer, // void ) ( edict_t *pEntity );
|
FM_ClientPutInServer, // done
|
||||||
FM_ClientCommand, // void ) ( edict_t *pEntity );
|
FM_ClientCommand, // done
|
||||||
|
|
||||||
FM_ServerDeactivate, // void) ( void );
|
FM_ServerDeactivate, // done
|
||||||
|
|
||||||
FM_PlayerPreThink, // void ) ( edict_t *pEntity );
|
FM_PlayerPreThink, // done
|
||||||
FM_PlayerPostThink, // void ) ( edict_t *pEntity );
|
FM_PlayerPostThink, // done
|
||||||
|
|
||||||
FM_StartFrame, // void ) ( void );
|
FM_StartFrame, // done
|
||||||
FM_ParmsNewLevel, // void ) ( void );
|
FM_ParmsNewLevel, // done
|
||||||
FM_ParmsChangeLevel, // void ) ( void );
|
FM_ParmsChangeLevel, // done
|
||||||
|
|
||||||
// Returns string describing current .dll. E.g., TeamFotrress 2, Half-Life
|
// Returns string describing current .dll. E.g., TeamFotrress 2, Half-Life
|
||||||
FM_GetGameDescription, // const char * )( void );
|
FM_GetGameDescription, // const char * )( void );
|
||||||
|
|
||||||
// Spectator funcs
|
// Spectator funcs
|
||||||
FM_SpectatorConnect, // void) ( edict_t *pEntity );
|
FM_SpectatorConnect, // done
|
||||||
FM_SpectatorDisconnect, // void ) ( edict_t *pEntity );
|
FM_SpectatorDisconnect, // done
|
||||||
FM_SpectatorThink, // void ) ( edict_t *pEntity );
|
FM_SpectatorThink, // done
|
||||||
|
|
||||||
// Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint.
|
// Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint.
|
||||||
FM_Sys_Error, // void ) ( const char *error_string );
|
FM_Sys_Error, // done
|
||||||
|
|
||||||
FM_PM_FindTextureType, // char )( char *name );
|
FM_PM_FindTextureType, // done
|
||||||
FM_RegisterEncoders, // void ) ( void );
|
FM_RegisterEncoders, // done
|
||||||
|
|
||||||
// Enumerates player hulls. Returns 0 if the hull number doesn't exist, 1 otherwise
|
// Enumerates player hulls. Returns 0 if the hull number doesn't exist, 1 otherwise
|
||||||
FM_GetHullBounds, // int) ( int hullnumber, float *mins, float *maxs );
|
FM_GetHullBounds, // int) ( int hullnumber, float *mins, float *maxs );
|
||||||
|
|
||||||
// Create baselines for certain "unplaced" items.
|
// Create baselines for certain "unplaced" items.
|
||||||
FM_CreateInstancedBaselines, // void ) ( void );
|
FM_CreateInstancedBaselines, // done
|
||||||
FM_AllowLagCompensation, // int )( void );
|
FM_AllowLagCompensation, // done
|
||||||
};
|
};
|
||||||
|
|
||||||
extern CVector<int> Engine[];
|
extern CVector<int> Engine[];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user