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

Override function values


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 05-25-2017 , 13:58   Override function values
Reply With Quote #1

I hooked CreateSphereObject function:

PHP Code:
SH_DECL_HOOK6(IPhysicsEnvironmentCreateSphereObjectSH_NOATTRIB0IPhysicsObject *, float int , const Vector &, const QAngle &, objectparams_t *, bool  ); 
PHP Code:
SH_ADD_HOOK_MEMFUNC(IPhysicsEnvironmentCreateSphereObjectg_pPhysicsEnvironment, &g_interface, &Test::CreateSphereObjectfalse); 
Here is my problem:
PHP Code:
IPhysicsObject *Test::CreateSphereObjectfloat radiusint materialIndex, const Vector &position, const QAngle &anglesobjectparams_t *pParamsbool isStatic ) {
    
//I need to override the values: radius, material Index, position... and pass it further, hos can I do that?

I tried RETURN_META_VALUE_MNEWPARAMS and RETURN_META_NEWPARAMS, neither way it works (compile time errors):
PHP Code:
    RETURN_META_NEWPARAMS(MRES_IGNORED, &IPhysicsEnvironment::CreateSphereObject, (radiusmaterialIndexpositionanglespParamsisStatic));
    
RETURN_META_VALUE_MNEWPARAMS(MRES_IGNOREDNULLCreateSphereObject, (radiusmaterialIndexpositionanglespParamsisStatic)); 
kadet.89 is offline
Send a message via Skype™ to kadet.89
 



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 01:32.


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