Advertisement
keybode

css v34 FrameStageNotify hook

Oct 7th, 2014
474
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.77 KB | None | 0 0
  1. void __fastcall Hooked_FrameStageNotify ( void* ecx, void* edx, unsigned int curStage )
  2. {
  3.     Vector3*    aimPunch = nullptr;
  4.     Vector3*    viewPunch = nullptr;
  5.     Vector3     punchAim, punchView;
  6.  
  7.     if ( curStage == 5 )
  8.     {
  9.         if ( m_pLocalEntity && !m_pLocalEntity->IsDead () )
  10.         {
  11.             viewPunch = (Vector3*)( m_pLocalEntity + NetVar::Entity::m_Local + NetVar::Entity::m_viewPunchAngle );
  12.             aimPunch = (Vector3*)( m_pLocalEntity + NetVar::Entity::m_Local + NetVar::Entity::m_aimPunchAngle );
  13.  
  14.             punchAim = *aimPunch;
  15.             punchView = *viewPunch;
  16.  
  17.             aimPunch->Init ();
  18.             viewPunch->Init ();
  19.         }
  20.     }
  21.  
  22.     m_pClientHook->GetMethod<FrameStageNotifyFn> ( ID_FRAME_STAGE_NOTIFY )( ecx, curStage );
  23.  
  24.     if ( aimPunch && viewPunch )
  25.     {
  26.         *aimPunch = punchAim;
  27.         *viewPunch = punchView;
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement