Oh dear, lots of changes:
1) Added get_orig_retval for retrieving the original return value of an engine function 2) Fixed engfunc being called with EngFunc_CheckVisibility so that it now works as intended 3) Hooks should now also work with FM_WalkMove, FM_TraceToss, FM_TraceMonsterHull, FM_TraceHull, FM_TraceModel, FM_TraceTexture, FM_TraceSphere, FM_GetBonePosition, FM_GetAttachment, FM_RunPlayerMove, FM_StaticDecal, FM_BuildSoundMsg and FM_CheckVisibility 4) Reformatted comments in some header files so they look a bit neater
This commit is contained in:
@ -913,6 +913,14 @@ static cell AMX_NATIVE_CALL engfunc(AMX *amx, cell *params)
|
||||
(*g_engfuncs.pfnPlaybackEvent)(iparam1,INDEXENT2(index),iparam2,fparam1,Vec1,Vec2,fparam2,fparam3,iparam3,iparam4,iparam5,iparam6);
|
||||
return 1;
|
||||
|
||||
//pfnCheckVisibility
|
||||
case EngFunc_CheckVisibility: // int ) ( const edict_t *entity, unsigned char *pset );
|
||||
cRet = MF_GetAmxAddr(amx, params[2]);
|
||||
index = cRet[0];
|
||||
CHECK_ENTITY(index);
|
||||
temp = MF_GetAmxString(amx,params[3],0,&len);
|
||||
return (*g_engfuncs.pfnCheckVisibility)(INDEXENT2(index), (unsigned char *)STRING(ALLOC_STRING(temp)));
|
||||
|
||||
// pfnGetCurrentPlayer
|
||||
case EngFunc_GetCurrentPlayer: // int ) ( void );
|
||||
return (*g_engfuncs.pfnGetCurrentPlayer)();
|
||||
|
Reference in New Issue
Block a user