maxzz Posted February 21, 2019 Share Posted February 21, 2019 I'm trying to hook the CWeapon::FireInstantHit function (0x73FB10), but for some reason, some parameters return empty. I'm using ms detours for the hooking. This is my function: char __fastcall FireInstantHit(void *this_, DWORD EDX_, CEntity *firingEntity, CVector *posn, CVector *effectPosn, CEntity *targetEntity, CVector *target, CVector *posnForDriveBy, char a8, char additionalEffects) { return origFireInstantHit(this_, firingEntity, posn, effectPosn, targetEntity, target, posnForDriveBy, a8, additionalEffects); } The variables firingEntity and posn return the right values, but targetEntity and target return nullptr, even though they should return their right values. Am I doing something wrong? The game is not crashing or something. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now