mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-07 02:18:35 +00:00
DHooks Merge pt2/2
This commit is contained in:
parent
8fc0e6fd5a
commit
8f568b9e71
@ -22,7 +22,7 @@ IPluginFunction *GetCallback(IPluginContext *pContext, HookSetup * setup, const
|
|||||||
{
|
{
|
||||||
IPluginFunction *ret = NULL;
|
IPluginFunction *ret = NULL;
|
||||||
|
|
||||||
if (params[0] >= callback_index)
|
if (static_cast<unsigned int>(params[0]) >= callback_index)
|
||||||
{
|
{
|
||||||
ret = pContext->GetFunctionById(params[callback_index]);
|
ret = pContext->GetFunctionById(params[callback_index]);
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ cell_t Native_AddParam(IPluginContext *pContext, const cell_t *params)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ParamInfo info;
|
::ParamInfo info;
|
||||||
|
|
||||||
info.type = (HookParamType)params[2];
|
info.type = (HookParamType)params[2];
|
||||||
|
|
||||||
|
|||||||
@ -3,11 +3,14 @@
|
|||||||
|
|
||||||
#include "extension.h"
|
#include "extension.h"
|
||||||
|
|
||||||
#include <sourcehook.h>
|
#include <sourcehook_pibuilder.h>
|
||||||
#include <sh_vector.h>
|
#include <sh_vector.h>
|
||||||
|
|
||||||
#include <macro-assembler.h>
|
#include <macro-assembler.h>
|
||||||
#include <assembler-x86.h>
|
#include <assembler-x86.h>
|
||||||
|
|
||||||
|
using namespace sp;
|
||||||
|
|
||||||
enum MRESReturn
|
enum MRESReturn
|
||||||
{
|
{
|
||||||
MRES_ChangedHandled = -2, // Use changed values and return MRES_Handled
|
MRES_ChangedHandled = -2, // Use changed values and return MRES_Handled
|
||||||
@ -122,7 +125,7 @@ public:
|
|||||||
class DHooksInfo
|
class DHooksInfo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SourceHook::CVector<ParamInfo> params;
|
SourceHook::CVector<::ParamInfo> params;
|
||||||
int offset;
|
int offset;
|
||||||
unsigned int returnFlag;
|
unsigned int returnFlag;
|
||||||
ReturnType returnType;
|
ReturnType returnType;
|
||||||
@ -304,7 +307,7 @@ public:
|
|||||||
ReturnType returnType;
|
ReturnType returnType;
|
||||||
HookType hookType;
|
HookType hookType;
|
||||||
ThisPointerType thisType;
|
ThisPointerType thisType;
|
||||||
SourceHook::CVector<ParamInfo> params;
|
SourceHook::CVector<::ParamInfo> params;
|
||||||
int offset;
|
int offset;
|
||||||
IPluginFunction *callback;
|
IPluginFunction *callback;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user