Raised This Month: $12 Target: $400
 3% 

[CSGO] SDKCall - UTIL_BloodDecalTrace


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 03-01-2016 , 16:03   [CSGO] SDKCall - UTIL_BloodDecalTrace
Reply With Quote #1

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!
__________________
micapat is offline
psychonic

BAFFLED
Join Date: May 2008
Old 03-01-2016 , 17:15   Re: [CSGO] SDKCall - UTIL_BloodDecalTrace
Reply With Quote #2

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.
psychonic is offline
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 03-01-2016 , 17:44   Re: [CSGO] SDKCall - UTIL_BloodDecalTrace
Reply With Quote #3

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 .
__________________

Last edited by micapat; 03-01-2016 at 17:47.
micapat is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:37.


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