Closed sovissa closed 4 years ago
most likely thats ur get_float()
problem
float get_float() {
using original_fn = float(__thiscall*)(convar*);
return (*(original_fn**)this)[12](this);
}
works fine for me.
backtrack::cvars.max_interp_ratio was nullptr. nop maybe init or hooks issue?
void __stdcall hooks::frame::hook( int frame_stage ) {
static bool backtrack_init = ( backtrack::init(), false );
if ( frame_stage == FRAME_NET_UPDATE_END && ctx::engine->in_game() )
backtrack::update();
orig_frame( ctx::client, frame_stage );
}
auto tg_frame = reinterpret_cast< void * >( get_virtual( ctx::client, 37 ) );
prediction::init( cmd ); {
backtrack::run( cmd );
} prediction::end();
namespace frame {
using fn = void( __thiscall * )( i_base_client_dll *, int );
void __stdcall hook( int frame_stage );
}
^^
try changing int frame_stage
to client_frame_stage_t frame_stage
in hooks.cpp:
but its crashing, when i calling this: