Исходник How to fix bones out of bounds after 27.09.2021

Забаненный
Статус
Оффлайн
Регистрация
20 Мар 2023
Сообщения
19
Реакции[?]
22
Поинты[?]
1K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
C++:
// Fix bones out of bounds.
// https://www.unknowncheats.me/forum/3256352-post.html
// SetCollisionBounds Address: 53 8B DC 83 EC 08 83 E4 F8 83 C4 04 55 8B 6B 04 89 6C 24 04 8B EC 83 EC 18 56 57 8B 7B
// UpdateCollisionBounds index: 340
void CBaseEntity::SetCollisionBounds( const Vector& OBBMins, const Vector& OBBMaxs )
{
    const auto Collideable = GetCollideable( );
    if ( !Collideable )
        return;
    
    static const auto nSetCollisionBounds = reinterpret_cast< void( __thiscall* )( ICollideable*, const Vector&, const Vector& ) >(
        csgo->Utils.FindPatternIDA( GetModuleHandleA( g_Modules[ fnva1( hs::client_dll.s( ).c_str( ) ) ]( ).c_str( ) ), hs::SetCollisionBounds.s( ).c_str( ) ) );
    
    auto& flCollisionChangeOrigin = *reinterpret_cast< float* >(
        reinterpret_cast< std::uintptr_t >( this ) + 0x9920
        );
    
     auto& flCollisionChangeTime = *reinterpret_cast< float* >(
        reinterpret_cast< std::uintptr_t >( this ) + 0x9924
        );
    
    flCollisionChangeOrigin = *reinterpret_cast< float* >( this + 0x4B ) + Collideable->OBBMaxs( ).z;
    flCollisionChangeTime = interfaces.global_vars->curtime;
    
    nSetCollisionBounds( Collideable, OBBMins. OBBMaxs );
    
    flCollisionChangeOrigin = flBackupCollisionChangeOrigin;
    flCollisionChangeTime = flBackupCollisionChangeTime;
}

void CBaseEntity::UpdateCollisionBounds( )
{
    typedef void( __thiscall* oUpdateCollisionBounds )( PVOID );
    return Memory::VFunc< oUpdateCollisionBounds >( this, hs::UpdateCollisionBounds )( this );
}
example how to use...
C++:
// Old:
// in LagCompensation.hpp
m_mins = m_player->GetCollideable( )->OBBMins( );
m_maxs = m_player->GetCollideable( )->OBBMaxs( );

// New:
// in LagCompensation.hpp
m_player->UpdateCollisionBounds( );
m_player->SetCollisionBounds( m_mins, m_maxs );
 
Сверху Снизу