diff options
| author | navewindre <boneyaard@gmail.com> | 2018-12-03 22:03:34 +0100 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2018-12-03 22:03:41 +0100 |
| commit | 716be28826ac61491944490373402c39123a1d75 (patch) | |
| tree | 60614ff806843ccfde19c95bd28a8a25a230a54f /cheat/internal_rewrite/ragebot_lagcomp.cpp | |
| parent | 4047e9083ef1731847bcd75f361f2d611fe5e401 (diff) | |
boris is cool
Diffstat (limited to 'cheat/internal_rewrite/ragebot_lagcomp.cpp')
| -rw-r--r-- | cheat/internal_rewrite/ragebot_lagcomp.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/cheat/internal_rewrite/ragebot_lagcomp.cpp b/cheat/internal_rewrite/ragebot_lagcomp.cpp index 5014143..ba1cc43 100644 --- a/cheat/internal_rewrite/ragebot_lagcomp.cpp +++ b/cheat/internal_rewrite/ragebot_lagcomp.cpp @@ -208,15 +208,22 @@ namespace features float delta = ent->m_flSimulationTime( ) - ent->m_flOldSimulationTime( );
new_record.m_globaltime = g_csgo.m_globals->m_curtime;
- if( g_settings.legit.enabled( ) )
- new_record.m_globaltime -= TICK_INTERVAL( );
+ new_record.m_globaltime -= util::get_lerptime( );
new_record.m_validtime = 0.f;
- if( ent->ce( )->SetupBones( new_record.m_matrix, 128, BONE_USED_BY_ANYTHING, 0.f ) ) {
- data.push_front( new_record );
+ matrix3x4 matrix[ 128 ];
+ ent->ce( )->SetupBones( matrix, 128, BONE_USED_BY_ANYTHING, 0.f );
+
+ for( size_t i{ }; i < 128; ++i ) {
+ vec3_t delta = math::get_matrix_position( matrix[ i ] ) - ent->m_vecOrigin( );
+ math::set_matrix_position( delta + ent->m_vecOrigin( ), matrix[ i ] );
}
+ memcpy( new_record.m_matrix, matrix, sizeof( matrix ) );
+
+ data.push_front( new_record );
+
last_simtime[ i ] = ent->m_flSimulationTime( );
}
@@ -258,7 +265,7 @@ namespace features auto next_record = ( it + 1 );
if( std::abs( it->m_simtime - ent->m_flSimulationTime( ) ) > TIME_TO_TICKS( 16 ) )
- break;
+ continue;
if( !it->m_validtime )
it->m_validtime = g_csgo.m_globals->m_curtime;
@@ -275,9 +282,14 @@ namespace features float curtime = g_csgo.m_globals->m_curtime;
float delta = ( curtime - it->m_validtime ) / lerptime;
+ delta = std::clamp( delta, 0.f, 1.f );
+
+ //EASE OUT BY NAVEWINDRE DO NOT STEAL
+ if( lerptime > 0.075f )
+ delta = 1 + pow( delta - 1, 3 );
vec3_t next = ( it + 1 ) == data.rend( ) ? ent->m_vecOrigin( ) : ( it + 1 )->m_origin;
- vec3_t lerp = math::lerp( it->m_origin, next, std::clamp( delta, 0.f, 1.f ) );
+ vec3_t lerp = math::lerp( it->m_origin, next, delta );
matrix3x4 ret[ 128 ];
|
