Some parts for local animations system from onetap v4

Забаненный
Статус
Оффлайн
Регистрация
18 Дек 2022
Сообщения
16
Реакции[?]
5
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
C++:
void CLocalAnimationSystem::Run(  )
{
    // backup this shit
    const auto flThirdPersonRecoil = g_LocalPlayer->m_flThirdPersonRecoil( );
    
    // setup this shit
    g_LocalPlayer->m_flThirdPersonRecoil( ) = g_LocalPlayer->GetAimPunchAngle( ) * 2.f;
    
    // run our animations, real, fake
    g_LocalAnimationSystem->UpdateRealState( );
    g_LocalAnimationSystem->UpdateFakeState( );
    
    // restore this shit
    g_LocalPlayer->m_flThirdPersonRecoil( ) = flThirdPersonRecoil;
    
}

void CLocalAnimationSystem::UpdateRealState( ) {
    // ohhh sharklaser what the fuck
    if ( g_LocalPlayer->GetVelocity( ).Length( ) < 1.f )
    {
        // clear fucking velocity
        g_LocalPlayer->GetVelocity( ) = Vector( 0.f, 0.f, 0.f );
        
        // set velocity
        g_LocalPlayer->SetAbsVelocity( g_LocalPlayer->GetVelocity( ) );
    }
    
    // calculate animation_layer_alive_loop weight
    g_LocalPlayer->GetAnimLayers( )[ 11 ].m_flWeight = 1.f - std::clamp< float >( std::clamp< float >( g_LocalPlayer->GetVelocity( ).Length2D( ) / g_LocalPlayer->GetMaxSpeed( ), 0.f, 1.f ) - 0.55f ) / 0.35f;
    
    // fix feet spin
    if ( g_LocalPlayer->GetSpawnTime( ) == flPreviousSpawnTime && !( g_LocalPlayer->GetFlags & FL_FROZEN ) )
    {
        // store shit
        AnimState->m_flFeetCycle = flPreviousFeetCycle;
        AnimState->m_flFeetWeight = flPreviousFeetWeight;
    }
    
    // update
    g_LocalPlayer->GetUpdatedAnimations( ) = true;
    g_LocalPlayer->GetUpdateClientSideAnimations( );
    g_LocalPlayer->GetUpdatedAnimations( ) = false;
    
    // restore spawn shit
    flPreviousSpawnTime = g_LocalPlayer->GetSpawnTime( );
    
    // restore stuff related to feets
    flPreviousFeetCycle = AnimState->m_flFeetCycle;
    flPreviousFeetWeight = AnimState->m_flFeetWeight;
    
    // fix jfasjfjas ofsioa
    g_LocalPlayer->DoAnimationEvents( 0 );
    
    // here lby timer etc same as in game
}

void CLocalAnimationSystem::UpdateFakeState( ) {
    // if u wanna this shit u can buy it: @masterlooser18
}
 
Забаненный
Статус
Оффлайн
Регистрация
20 Дек 2022
Сообщения
5
Реакции[?]
3
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
C++:
void CLocalAnimationSystem::Run(  )
{
    // backup this shit
    const auto flThirdPersonRecoil = g_LocalPlayer->m_flThirdPersonRecoil( );
   
    // setup this shit
    g_LocalPlayer->m_flThirdPersonRecoil( ) = g_LocalPlayer->GetAimPunchAngle( ) * 2.f;
   
    // run our animations, real, fake
    g_LocalAnimationSystem->UpdateRealState( );
    g_LocalAnimationSystem->UpdateFakeState( );
   
    // restore this shit
    g_LocalPlayer->m_flThirdPersonRecoil( ) = flThirdPersonRecoil;
   
}

void CLocalAnimationSystem::UpdateRealState( ) {
    // ohhh sharklaser what the fuck
    if ( g_LocalPlayer->GetVelocity( ).Length( ) < 1.f )
    {
        // clear fucking velocity
        g_LocalPlayer->GetVelocity( ) = Vector( 0.f, 0.f, 0.f );
       
        // set velocity
        g_LocalPlayer->SetAbsVelocity( g_LocalPlayer->GetVelocity( ) );
    }
   
    // calculate animation_layer_alive_loop weight
    g_LocalPlayer->GetAnimLayers( )[ 11 ].m_flWeight = 1.f - std::clamp< float >( std::clamp< float >( g_LocalPlayer->GetVelocity( ).Length2D( ) / g_LocalPlayer->GetMaxSpeed( ), 0.f, 1.f ) - 0.55f ) / 0.35f;
   
    // fix feet spin
    if ( g_LocalPlayer->GetSpawnTime( ) == flPreviousSpawnTime && !( g_LocalPlayer->GetFlags & FL_FROZEN ) )
    {
        // store shit
        AnimState->m_flFeetCycle = flPreviousFeetCycle;
        AnimState->m_flFeetWeight = flPreviousFeetWeight;
    }
   
    // update
    g_LocalPlayer->GetUpdatedAnimations( ) = true;
    g_LocalPlayer->GetUpdateClientSideAnimations( );
    g_LocalPlayer->GetUpdatedAnimations( ) = false;
   
    // restore spawn shit
    flPreviousSpawnTime = g_LocalPlayer->GetSpawnTime( );
   
    // restore stuff related to feets
    flPreviousFeetCycle = AnimState->m_flFeetCycle;
    flPreviousFeetWeight = AnimState->m_flFeetWeight;
   
    // fix jfasjfjas ofsioa
    g_LocalPlayer->DoAnimationEvents( 0 );
   
    // here lby timer etc same as in game
}

void CLocalAnimationSystem::UpdateFakeState( ) {
    // if u wanna this shit u can buy it: @masterlooser18
}
Pasting it while you are reading this comment :sunglasses:
 
Похожие темы
Сверху Снизу