Вопрос Fakelag delayed animations

Начинающий
Статус
Оффлайн
Регистрация
12 Июн 2022
Сообщения
3
Реакции[?]
0
Поинты[?]
0
can someone give me some hints how can i make my fakelag animfix smoother and fix this delay between jump and land animation

Пожалуйста, авторизуйтесь для просмотра ссылки.
 
Начинающий
Статус
Оффлайн
Регистрация
12 Июн 2022
Сообщения
3
Реакции[?]
0
Поинты[?]
0
animation fix code attach maybe ??????
i'm using default supremacy animfix, and it's working i just need help with improving it

C++:
void Client::UpdateLocal()
{
#ifdef _DEBUG
    return;
#endif

    CCSGOPlayerAnimState* state = g_cl.m_local->m_PlayerAnimState();
    if (!state)
        return;

    float backup_frametime = g_csgo.m_globals->m_frametime;
    float backup_curtime = g_csgo.m_globals->m_curtime;

    const float v3 = game::TICKS_TO_TIME(g_cl.m_local->m_nTickBase());
    const float v4 = (v3 / g_csgo.m_globals->m_interval) + .5f;

    static float backup_poses[24];
    static C_AnimationLayer backup_animlayer[13];

    g_csgo.m_globals->m_curtime = g_cl.m_local->m_nTickBase() * g_csgo.m_globals->m_interval;
    g_csgo.m_globals->m_frametime = g_csgo.m_globals->m_interval;

    math::clamp(m_real_angle.x, -90.f, 90.f);
    m_real_angle.normalize();

    // CCSGOPlayerAnimState::Update, bypass already animated checks.
    if (state->m_frame >= v4)
        state->m_frame = v4 - 1;

    if (g_csgo.m_globals->m_curtime != state->m_time)
    {
        g_cl.m_update_anims = true;
        g_cl.m_local->UpdateAnimationState(state, vec3_t(m_real_angle.x, m_real_angle.y, m_real_angle.z));
        g_cl.m_local->UpdateClientSideAnimation();
        m_abs_yaw = state->m_goal_feet_yaw;

        g_cl.m_update_anims = false;

        g_cl.m_local->GetAnimLayers(backup_animlayer);
        g_cl.m_local->GetPoseParameters(backup_poses);

    }

    g_cl.m_local->SetAnimLayers(backup_animlayer);
    g_cl.m_local->SetPoseParameters(backup_poses);

    g_csgo.m_globals->m_curtime = backup_curtime;
    g_csgo.m_globals->m_frametime = backup_frametime;
}
 
like amiri in my mind
Пользователь
Статус
Оффлайн
Регистрация
4 Дек 2022
Сообщения
308
Реакции[?]
54
Поинты[?]
1K
hints in making close to ideal localanimfix:
delayed anims happen cuz data from server is delayed so u can simulate it by ur self in createmove
1)use createmove(best way imo, cuz its impossible to fix via fsn(i think)), simplest example - https://yougame.biz/threads/286638/
2)simulate animstate via local cmds, not networked(but some data might be networked like land sequence etc, think urself what u need)
example:
if(cmd->m_buttons & IN_JUMP && g_ctx->local()->flags() & FL_ONGROUND)
g_ctx->local()->flags() &= ~FL_ONGROUND
note: its idea, not full fix, also u can simulate any part of animstate and ur localanimfix will be perfect and wont be delayed
 
Последнее редактирование:
retard
Пользователь
Статус
Оффлайн
Регистрация
13 Мар 2021
Сообщения
365
Реакции[?]
67
Поинты[?]
10K
hints in making close to ideal localanimfix:
delayed anims happen cuz data from server is delayed so u can simulate it by ur self in createmove
1)use createmove(best way imo, cuz its impossible to fix via fsn(i think)), simplest example - https://yougame.biz/threads/286638/
2)simulate animstate via local cmds, not networked(but some data might be networked like land sequence etc, think urself what u need)
example:
if(cmd->m_buttons & IN_JUMP && g_ctx->local()->flags() & FL_ONGROUND)
g_ctx->local()->flags() &= ~FL_ONGROUND
note: its idea, not full fix, also u can simulate any part of animstate and ur localanimfix will be perfect and wont be delayed
why simulate by urself and not sync it??
 
like amiri in my mind
Пользователь
Статус
Оффлайн
Регистрация
4 Дек 2022
Сообщения
308
Реакции[?]
54
Поинты[?]
1K
why simulate by urself and not sync it??
try to net_fakelag ( > 50) and ull see data is delayed af, i dont have any idea instead of this how i can do it another way
also why not if u can fully simulate it on client, for example u will have every type of data to simulate every animation, u will have local origin, u can check onground by : getgroundentity(), why not?
 
Последнее редактирование:
retard
Пользователь
Статус
Оффлайн
Регистрация
13 Мар 2021
Сообщения
365
Реакции[?]
67
Поинты[?]
10K
try to net_fakelag ( > 50) and ull see data is delayed af, i dont have any idea instead of this how i can do it another way
yeah if u dont sync anims with sv lmao, try simtime > oldsimtime to sync if not then the ur anims or his are prolly wrong
i'm using default supremacy animfix, and it's working i just need help with improving it

C++:
void Client::UpdateLocal()
{
#ifdef _DEBUG
    return;
#endif

    CCSGOPlayerAnimState* state = g_cl.m_local->m_PlayerAnimState();
    if (!state)
        return;

    float backup_frametime = g_csgo.m_globals->m_frametime;
    float backup_curtime = g_csgo.m_globals->m_curtime;

    const float v3 = game::TICKS_TO_TIME(g_cl.m_local->m_nTickBase());
    const float v4 = (v3 / g_csgo.m_globals->m_interval) + .5f;

    static float backup_poses[24];
    static C_AnimationLayer backup_animlayer[13];

    g_csgo.m_globals->m_curtime = g_cl.m_local->m_nTickBase() * g_csgo.m_globals->m_interval;
    g_csgo.m_globals->m_frametime = g_csgo.m_globals->m_interval;

    math::clamp(m_real_angle.x, -90.f, 90.f);
    m_real_angle.normalize();

    // CCSGOPlayerAnimState::Update, bypass already animated checks.
    if (state->m_frame >= v4)
        state->m_frame = v4 - 1;

    if (g_csgo.m_globals->m_curtime != state->m_time)
    {
        g_cl.m_update_anims = true;
        g_cl.m_local->UpdateAnimationState(state, vec3_t(m_real_angle.x, m_real_angle.y, m_real_angle.z));
        g_cl.m_local->UpdateClientSideAnimation();
        m_abs_yaw = state->m_goal_feet_yaw;

        g_cl.m_update_anims = false;

        g_cl.m_local->GetAnimLayers(backup_animlayer);
        g_cl.m_local->GetPoseParameters(backup_poses);

    }

    g_cl.m_local->SetAnimLayers(backup_animlayer);
    g_cl.m_local->SetPoseParameters(backup_poses);

    g_csgo.m_globals->m_curtime = backup_curtime;
    g_csgo.m_globals->m_frametime = backup_frametime;
}
also this isn't def sup 😭😭
 
like amiri in my mind
Пользователь
Статус
Оффлайн
Регистрация
4 Дек 2022
Сообщения
308
Реакции[?]
54
Поинты[?]
1K
yeah if u dont sync anims with sv lmao, try simtime > oldsimtime to sync if not then the ur anims or his are prolly wrong
i tested shit on days, i didnt end this but iam sure it might fix the issue. do u have any other ideas how to prevent delays? its like if ure ping is lower 40 u can fix nothing, but when its over 100 ur anim sequences will be desyncronized
 
Начинающий
Статус
Оффлайн
Регистрация
12 Июн 2022
Сообщения
3
Реакции[?]
0
Поинты[?]
0
hints in making close to ideal localanimfix:
delayed anims happen cuz data from server is delayed so u can simulate it by ur self in createmove
1)use createmove(best way imo, cuz its impossible to fix via fsn(i think)), simplest example - https://yougame.biz/threads/286638/
2)simulate animstate via local cmds, not networked(but some data might be networked like land sequence etc, think urself what u need)
example:
if(cmd->m_buttons & IN_JUMP && g_ctx->local()->flags() & FL_ONGROUND)
g_ctx->local()->flags() &= ~FL_ONGROUND
note: its idea, not full fix, also u can simulate any part of animstate and ur localanimfix will be perfect and wont be delayed
thanks for some help, i already tried to do that in fsn earlier and it didnt work, now i tried it in createmove and it still doesnt work.
i dont really know how setupbones works and why people do it in first place, ill try to do my research

yeah maybe, my base is farmhack i thought it's default sup animfix
 
Похожие темы
Сверху Снизу