Вопрос Resolve Move

Забаненный
Статус
Оффлайн
Регистрация
20 Дек 2022
Сообщения
5
Реакции[?]
3
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
I am currently comparing playbackrate deltas to get a side and bruting moveyaw when moving and aimyawmax when standing. I still manage to miss people. Maybe i am doing something wrong. If yall can drop some pseudos or example code that would be nice
 
Модератор форума
Модератор
Статус
Оффлайн
Регистрация
26 Янв 2020
Сообщения
378
Реакции[?]
157
Поинты[?]
9K
In fact, the problem may lie not only in the resolver itself. For this type of resolver to work correctly, you need to have a correct update of the player's animation, as well as rotation simulations. For me, the seemingly crude checks that one delta is larger than the other work perfectly.
 
Забаненный
Статус
Оффлайн
Регистрация
20 Дек 2022
Сообщения
5
Реакции[?]
3
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
In fact, the problem may lie not only in the resolver itself. For this type of resolver to work correctly, you need to have a correct update of the player's animation, as well as rotation simulations. For me, the seemingly crude checks that one delta is larger than the other work perfectly.
I dont know what is correct for you. I can send you resolver and animfix itself and maybe you can check it out.
 
Забаненный
Статус
Оффлайн
Регистрация
18 Дек 2022
Сообщения
16
Реакции[?]
5
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
I am currently comparing playbackrate deltas to get a side and bruting moveyaw when moving and aimyawmax when standing. I still manage to miss people. Maybe i am doing something wrong. If yall can drop some pseudos or example code that would be nice
hi dude you need a velocity fix use 11 animation layer
example
C++:
// check weight
if ( LagRecord->m_AnimationLayers[ 11 ].m_flWeight > 0 && LagRecord->m_AnimationLayers[ 11 ].m_flWeight < 1 )
{
    // bypass this check: https://github.com/perilouswithadollarsign/cstrike15_src/blob/master/game/shared/cstrike15/csgo_playeranimstate.cpp#L1198-L1200
    if ( LagRecord->m_AnimationLayers[ 11 ].m_flPlayBackRate == PreviousLagRecord->m_AnimationLayers[ 11 ].m_flPlayBackRate )
    {
        // get weapon handle
        const auto Weapon = g_LocalPlayer->GetWeapon( ).GetActiveHandle( );
       
        // compare speed
        // https://github.com/perilouswithadollarsign/cstrike15_src/blob/master/game/shared/cstrike15/csgo_playeranimstate.cpp#L2266-L2268
        auto flMaxSpeedRun = Weapon ? std::max( Weapon->GetMaxSpeed( ), 0.001f ) : 260.f;
       
        // get modifier
        auto flModifier = 0.35f - ( 1.f - LagRecord->m_AnimationLayers[ 11 ].m_flWeight );
       
        // get speed as portion
        auto flSpeedAsPortion = flMaxSpeedRun * ( flModifier + 0.55f );
       
        // compare all shit
        if ( flModifier > 0 && flModifier < 1 )
        {
            // setup fixed velocity
            LagRecord->m_vecVelocity.x /= Player->GetVelocity( ).Length2D( );
            LagRecord->m_vecVelocity.y /= Player->GetVelocity( ).Length2D( );
           
            LagRecord->m_vecVelocity.x *= flSpeedAsPortion;
            LagRecord->m_vecVelocity.y *= flSpeedAsPortion;
        }
    }
}
and i think u need recalc ur velocity use formula origin_delta / time_delta
is this 30% for fixing player moving activities
 
Забаненный
Статус
Оффлайн
Регистрация
20 Дек 2022
Сообщения
5
Реакции[?]
3
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
hi dude you need a velocity fix use 11 animation layer
example
C++:
// check weight
if ( LagRecord->m_AnimationLayers[ 11 ].m_flWeight > 0 && LagRecord->m_AnimationLayers[ 11 ].m_flWeight < 1 )
{
bypass this check: https://github.com/perilouswithadollarsign/cstrike15_src/blob/master/game/shared/cstrike15/csgo_playeranimstate.cpp#L1198-L1200
    if ( LagRecord->m_AnimationLayers[ 11 ].m_flPlayBackRate == PreviousLagRecord->m_AnimationLayers[ 11 ].m_flPlayBackRate )
    {
get weapon handle
const auto Weapon = g_LocalPlayer->GetWeapon( ). GetActiveHandle( );
      
compare speed
https://github.com/perilouswithadollarsign/cstrike15_src/blob/master/game/shared/cstrike15/csgo_playeranimstate.cpp#L2266-L2268
        auto flMaxSpeedRun = Weapon ? std::max( Weapon->GetMaxSpeed( ), 0.001f ) : 260.f;
      
get modifier
        auto flModifier = 0.35f - ( 1.f - LagRecord->m_AnimationLayers[ 11 ].m_flWeight );
      
get speed as portion
        auto flSpeedAsPortion = flMaxSpeedRun * ( flModifier + 0.55f );
      
compare all shit
        if ( flModifier > 0 && flModifier < 1 )
        {
setup fixed velocity
LagRecord->m_vecVelocity.x /= Player->GetVelocity( ). Length2D( );
LagRecord->m_vecVelocity.y /= Player->GetVelocity( ). Length2D( );
          
            LagRecord->m_vecVelocity.x *= flSpeedAsPortion;
            LagRecord->m_vecVelocity.y *= flSpeedAsPortion;
        }
    }
}
and i think u need recalc ur velocity use formula origin_delta / time_delta
is this 30% for fixing player moving activities
Damn bro thanks would give you reaction for this but dont have any anyway you have been any helpful
 
Модератор форума
Модератор
Статус
Оффлайн
Регистрация
26 Янв 2020
Сообщения
378
Реакции[?]
157
Поинты[?]
9K
hi dude you need a velocity fix use 11 animation layer
example
C++:
// check weight
if ( LagRecord->m_AnimationLayers[ 11 ].m_flWeight > 0 && LagRecord->m_AnimationLayers[ 11 ].m_flWeight < 1 )
{
    // bypass this check: https://github.com/perilouswithadollarsign/cstrike15_src/blob/master/game/shared/cstrike15/csgo_playeranimstate.cpp#L1198-L1200
    if ( LagRecord->m_AnimationLayers[ 11 ].m_flPlayBackRate == PreviousLagRecord->m_AnimationLayers[ 11 ].m_flPlayBackRate )
    {
        // get weapon handle
        const auto Weapon = g_LocalPlayer->GetWeapon( ).GetActiveHandle( );
     
        // compare speed
        // https://github.com/perilouswithadollarsign/cstrike15_src/blob/master/game/shared/cstrike15/csgo_playeranimstate.cpp#L2266-L2268
        auto flMaxSpeedRun = Weapon ? std::max( Weapon->GetMaxSpeed( ), 0.001f ) : 260.f;
     
        // get modifier
        auto flModifier = 0.35f - ( 1.f - LagRecord->m_AnimationLayers[ 11 ].m_flWeight );
     
        // get speed as portion
        auto flSpeedAsPortion = flMaxSpeedRun * ( flModifier + 0.55f );
     
        // compare all shit
        if ( flModifier > 0 && flModifier < 1 )
        {
            // setup fixed velocity
            LagRecord->m_vecVelocity.x /= Player->GetVelocity( ).Length2D( );
            LagRecord->m_vecVelocity.y /= Player->GetVelocity( ).Length2D( );
         
            LagRecord->m_vecVelocity.x *= flSpeedAsPortion;
            LagRecord->m_vecVelocity.y *= flSpeedAsPortion;
        }
    }
}
and i think u need recalc ur velocity use formula origin_delta / time_delta
is this 30% for fixing player moving activities
This fix does not cover all cases of player movement. It should also be noted that in addition to synchronizing velo, you need to compensate lags and activity for such cases.
 
Забаненный
Статус
Оффлайн
Регистрация
18 Дек 2022
Сообщения
16
Реакции[?]
5
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
This fix does not cover all cases of player movement. It should also be noted that in addition to synchronizing velo, you need to compensate lags and activity for such cases.
lags are compensated very easy, u just need to animate each choked tick, then u can got a simulated choked tick, set flCurtime / flFrametime data and then u are update animations and restore this data
upd:
example how to do
1.) Interpolate all entities manually.
2.) Call InvalidateBoneCaches().
3.) Call ProcessOnDataChangedEvents().
4.) Simulate entities manually.
5.) Call ThreadedBoneSetup().
 
Сверху Снизу