-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathget_local_viewangles.cpp
More file actions
30 lines (23 loc) · 962 Bytes
/
get_local_viewangles.cpp
File metadata and controls
30 lines (23 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "context.h"
#include <intrin.h>
decltype( hooked::original::o_get_local_viewangles ) hooked::original::o_get_local_viewangles;
// demo psilent/ whatever
// BUTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
// http://hrt.rocks/u/DeThU.png
// seems as tho ur animfix CRASHES when i record a demo ! ! ! ! !
void __fastcall hooked::get_local_viewangles( void* ecx, void* edx, vec3& angles )
{
if ( !ctx.m_local )
return hooked::original::o_get_local_viewangles( ecx, edx, angles );
vec3 stored;
hooked::original::o_get_local_viewangles( ecx, edx, stored );
if ( _ReturnAddress( ) == memory::pattern::first_code_match< void* >( csgo.m_client.module( ), xors( "C7 46 ? ? ? ? ? 43" ) ) )
{
// will result in demos
// looking like this
// https://www.youtube.com/watch?v=a2E7svp1PGw&t=18s
ctx.m_local->v_angle( ) = csgo.m_engine( )->GetViewAngles( );
}
hooked::original::o_get_local_viewangles( ecx, edx, angles );
ctx.m_local->v_angle( ) = stored;
}