Исходник Aimware Desync

НАЧНИ ПРОГРАММИРОВАТЬ ПРЯМО СЕЙЧАС
Участник
Статус
Оффлайн
Регистрация
19 Июн 2017
Сообщения
608
Реакции[?]
924
Поинты[?]
4K
When it hit it hit.
Забаненный
Статус
Оффлайн
Регистрация
2 Апр 2019
Сообщения
131
Реакции[?]
66
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
void lbyanimations::update_server_animation( entity_t* player ) {
    if ( !player || !player->health( ) )
        return;

    bool allocate = ( player_animstate == nullptr );
    bool change   = ( !allocate ) && ( &utilities::global::local_player->get_handle( ) != entity_handle );
    bool reset    = ( !allocate && !change ) && ( utilities::global::local_player->spawn_time( ) != spawn_time );

    if( change )
        interfaces::mem_alloc->free( player_animstate );

    if( reset ) {
        player->reset_animation_state( player_animstate );

        spawn_time = utilities::global::local_player->spawn_time( );
    }

    if( allocate || change ) {
        c_animstate* state = reinterpret_cast<c_animstate*>( interfaces::mem_alloc->alloc( sizeof( c_animstate ) ) );

        if( state != nullptr )
            player->create_animation_state( state );

        entity_handle = const_cast<c_base_handle*>( &player->get_handle( ) );
        spawn_time = utilities::global::local_player->spawn_time( );

        player_animstate = state;
    }
    float_t curtime = ticks_to_time( player->tick_base( ) + 11.f );
    if ( !interfaces::clientstate->chokedcommands && player_animstate ) {
        player->update_animation_state( player_animstate, utilities::global::cmd->view_angles );
        auto clamp_yaw = [ ]( float yaw ) {
            while (yaw > 180.f)
                yaw -= 360.f;
            while (yaw < -180.f)
                yaw += 360.f;
            return yaw;
        };
        float_t delta = std::abs( clamp_yaw( utilities::global::cmd->view_angles.y - player->lowerbody_yaw_target( ) ) );
      
        if ( player_animstate->m_velocity > 0.1f && ( player->flags( ) & fl_onground ) )
            next_body_update = curtime + utilities::global::local_player->simulation_time( ) + 1.1f;
  
        else if ( curtime >= next_body_update ) {
            if ( delta > ( PI / 180 - next_body_update ) * 0.35f ) ;

            next_body_update = curtime + utilities::global::local_player->simulation_time( ) + 0.22f;
        }
    }
    break_lowerbody = ( player->flags( ) & fl_onground ) && ( ( next_body_update - curtime ) <= interfaces::globals->interval_per_tick );
}
perfect breaker for desync hf
+
 
Последнее редактирование:
Забаненный
Статус
Оффлайн
Регистрация
9 Янв 2019
Сообщения
701
Реакции[?]
295
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
we dont even know whats an mem_alloc->free lol
meh
mem_alloc is a pointer to IMemAlloc interface, which is:
C++:
#pragma once
class IMemAlloc
{
    
public:
    
    auto Alloc( int nSize ) -> void *
    {
        using Fn = void *( __thiscall * )( void*, int );
        return CallVFunction< Fn >( this, 1 )( this, nSize );
    }

    auto Realloc( void* pMem, int nSize ) -> void *
    {
        using Fn = void *( __thiscall * )( void*, void*, int );
        return CallVFunction< Fn >( this, 3 )( this, pMem, nSize );
    }

    auto Free( void* pMem ) -> void
    {
        using Fn = void( __thiscall * )( void*, void* );
        return CallVFunction< Fn >( this, 5 )( this, pMem );
    }
};
could be initializated by getting handle from tier0, rest is up2u :)
 
Сверху Снизу