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

Detour in __usercall


Post New Thread Reply   
 
Thread Tools Display Modes
Wazz
SourceMod Donor
Join Date: Mar 2009
Old 01-01-2011 , 20:59   Re: Detour in __usercall
Reply With Quote #11

Then again, a naked function used as a wrapper to call a 'normal' __cdecl function wouldn't be too messy.
Wazz is offline
AltPluzF4
Senior Member
Join Date: Aug 2007
Old 01-01-2011 , 21:11   Re: Detour in __usercall
Reply With Quote #12

Could you please explain what you're trying to do anyway? I was going to attempt to create a detour on this function, but hell... putting a breakpoint on it, I can't seem to get it to fire. (Yes, breakpoints on other functions work fine.) I don't know if this is even called...

I loaded it on CSS, ran into barrels on dust2, threw my gun into barrels. Spawned bots, ran into them. Nothing seems to call it.

If you can tell me something you know that will cause it to fire, I can test from there... but as it is now, I'm lost :-/
__________________
AltPluzF4 is offline
raydan
Senior Member
Join Date: Aug 2006
Old 01-01-2011 , 23:31   Re: Detour in __usercall
Reply With Quote #13

PhysicsCheckSweep only call from
void CBaseEntity:hysicsPushEntity( const Vector& push, trace_t *pTrace )

set a breakpoint & try throw a grenade

by the way, i don't need detour this function any more. i already use another function to achieve my purpose
raydan is offline
AltPluzF4
Senior Member
Join Date: Aug 2007
Old 01-01-2011 , 23:36   Re: Detour in __usercall
Reply With Quote #14

Oh alright..... yeah, I completely forgot to try a grenade lol :-/
__________________
AltPluzF4 is offline
AltPluzF4
Senior Member
Join Date: Aug 2007
Old 01-02-2011 , 00:00   Re: Detour in __usercall
Reply With Quote #15

For future reference...
This works, however it's probably a bad way to handle it. lol

PHP Code:
DETOUR_DECL_STATIC2(PhysicsSweep, static voidVector *, vecAbsDeltatrace_t *, pTrace)
{
    
CBaseEntity *pEntity NULL;
    
__asm mov pEntityesi
    Vector 
*vecAbsStart NULL;
    
__asm mov vecAbsStartedi

    Msg
("[DEBUG] PhysicsSweep: 0x%08X\n"pEntity);

    
__asm mov esipEntity
    __asm mov edi
vecAbsStart
    DETOUR_STATIC_CALL
(PhysicsSweep)(vecAbsDeltapTrace);

__________________
AltPluzF4 is offline
Reply



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 16:05.


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