I hooked CreateSphereObject function:
PHP Code:
SH_DECL_HOOK6(IPhysicsEnvironment, CreateSphereObject, SH_NOATTRIB, 0, IPhysicsObject *, float , int , const Vector &, const QAngle &, objectparams_t *, bool );
PHP Code:
SH_ADD_HOOK_MEMFUNC(IPhysicsEnvironment, CreateSphereObject, g_pPhysicsEnvironment, &g_interface, &Test::CreateSphereObject, false);
Here is my problem:
PHP Code:
IPhysicsObject *Test::CreateSphereObject( float radius, int materialIndex, const Vector &position, const QAngle &angles, objectparams_t *pParams, bool 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, (radius, materialIndex, position, angles, pParams, isStatic));
RETURN_META_VALUE_MNEWPARAMS(MRES_IGNORED, NULL, CreateSphereObject, (radius, materialIndex, position, angles, pParams, isStatic));