mirror of
https://github.com/rehlds/reapi.git
synced 2024-12-28 15:45:31 +03:00
Implemented ATYPE_TRACE for SetHookChainArg native useful for replacement data on tracehandle argument
This commit is contained in:
parent
8c670fa40f
commit
7c959fa9bd
@ -130,7 +130,8 @@ enum AType
|
|||||||
ATYPE_EDICT,
|
ATYPE_EDICT,
|
||||||
ATYPE_EVARS,
|
ATYPE_EVARS,
|
||||||
ATYPE_BOOL,
|
ATYPE_BOOL,
|
||||||
ATYPE_VECTOR
|
ATYPE_VECTOR,
|
||||||
|
ATYPE_TRACE
|
||||||
};
|
};
|
||||||
|
|
||||||
enum HookChain
|
enum HookChain
|
||||||
|
@ -21,7 +21,8 @@ enum AType : uint8
|
|||||||
ATYPE_EDICT,
|
ATYPE_EDICT,
|
||||||
ATYPE_EVARS,
|
ATYPE_EVARS,
|
||||||
ATYPE_BOOL,
|
ATYPE_BOOL,
|
||||||
ATYPE_VECTOR
|
ATYPE_VECTOR,
|
||||||
|
ATYPE_TRACE
|
||||||
};
|
};
|
||||||
|
|
||||||
struct retval_t
|
struct retval_t
|
||||||
@ -53,6 +54,7 @@ inline AType getApiType(entvars_t *) { return ATYPE_EVARS; }
|
|||||||
inline AType getApiType(bool) { return ATYPE_BOOL; }
|
inline AType getApiType(bool) { return ATYPE_BOOL; }
|
||||||
inline AType getApiType(Vector) { return ATYPE_VECTOR; }
|
inline AType getApiType(Vector) { return ATYPE_VECTOR; }
|
||||||
inline AType getApiType(ENTITYINIT) { return ATYPE_INTEGER; }
|
inline AType getApiType(ENTITYINIT) { return ATYPE_INTEGER; }
|
||||||
|
inline AType getApiType(TraceResult*) { return ATYPE_TRACE; }
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline AType getApiType(T *) { return ATYPE_INTEGER; }
|
inline AType getApiType(T *) { return ATYPE_INTEGER; }
|
||||||
|
@ -322,6 +322,9 @@ cell AMX_NATIVE_CALL SetHookChainArg(AMX *amx, cell *params)
|
|||||||
case ATYPE_EVARS:
|
case ATYPE_EVARS:
|
||||||
*(entvars_t **)destAddr = PEV(*srcAddr);
|
*(entvars_t **)destAddr = PEV(*srcAddr);
|
||||||
break;
|
break;
|
||||||
|
case ATYPE_TRACE:
|
||||||
|
**(TraceResult **)destAddr = *(TraceResult *)(*srcAddr);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -250,7 +250,8 @@ const char *getATypeStr(AType type)
|
|||||||
"ATYPE_EDICT",
|
"ATYPE_EDICT",
|
||||||
"ATYPE_EVARS",
|
"ATYPE_EVARS",
|
||||||
"ATYPE_BOOL",
|
"ATYPE_BOOL",
|
||||||
"ATYPE_VECTOR"
|
"ATYPE_VECTOR",
|
||||||
|
"ATYPE_TRACE"
|
||||||
};
|
};
|
||||||
|
|
||||||
if (type >= arraysize(s_ATypes))
|
if (type >= arraysize(s_ATypes))
|
||||||
|
Loading…
Reference in New Issue
Block a user