AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [CSGO] SDKCall - UTIL_BloodDecalTrace (https://forums.alliedmods.net/showthread.php?t=279816)

micapat 03-01-2016 16:03

[CSGO] SDKCall - UTIL_BloodDecalTrace
 
Hi everyone,

I'm trying to call UTIL_BloodDecalTrace(), but nothing happens (Not even a crash !).

The prototype is:
PHP Code:

void UTIL_BloodDecalTrace(CGameTrace *pTraceint iBloodColor); 

For the initialization, I did:

PHP Code:

// @_Z20UTIL_BloodDecalTraceP10CGameTracei

StartPrepSDKCall(SDKCall_Static);
PrepSDKCall_SetFromConf(hLibrarySDKConf_Signature"UTIL_BloodDecalTrace");
PrepSDKCall_AddParameter(SDKType_PlainOldDataSDKPass_Pointer); // Not sure about this one!!
PrepSDKCall_AddParameter(SDKType_PlainOldDataSDKPass_Plain);
gl_util_fctBloodDecalTrace EndPrepSDKCall(); 

For the call, I did:

PHP Code:

Handle hTrace TR_TraceRayEx(vStartvEndMASK_SOLIDRayType_EndPoint);
SDKCall(gl_util_fctBloodDecalTracehTrace247); 

I got TR_GetFraction() < 1.0, so hTrace should be ok.

----------------------
What's the issue? Is it possible to have an argument "trace_t *" with SDKCall?

I made the assumption that CGameTrace * == trace_t * for CS:GO, is it wrong?
(I found in SDK 2013: https://github.com/ValveSoftware/sou...ametrace.h#L92)

Thanks!

psychonic 03-01-2016 17:15

Re: [CSGO] SDKCall - UTIL_BloodDecalTrace
 
A SourceMod Handle is an opaque value used to reference an object. It is not the same as nor usable as a direct memory pointer to the object.

micapat 03-01-2016 17:44

Re: [CSGO] SDKCall - UTIL_BloodDecalTrace
 
Oh ok, then there's no way with a plugin to call a function with CGameTrace *...
No function have been developed to retrieve the memory address of an object referenced by a SourceMod Handle, right?

I will do it with an extension then :(.


All times are GMT -4. The time now is 12:33.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.