haekb / nolf2-modernizer

NOLF 2 Modernizer aims to unlock resolution support, restore multi-player support, and fix a few bugs here and there.
https://haekb.itch.io/nolf2-modernizer
30 stars 4 forks source link

Weapon animation is affected by framerate #72

Open haekb opened 4 years ago

haekb commented 4 years ago

It's not as pronounced as it is in NOLF 1, but it can get pretty bad on weapons like the shotgun.

I've made some suggested changes by thecanonmaster from the LithFAQ discord, and it works a lot better...still needs some work though. Here's a sample video with it fixed to 0.005f https://streamable.com/kxcfwo

    auto fFrametime = g_pGameClientShell->GetFrameTime();

    g_pLTClient->CPrint("fFrameTime: %f", fFrametime);

    ANIMTRACKERID pMainTracker;
    g_pModelLT->GetMainTracker(m_hObject, pMainTracker);
    g_pModelLT->SetPlaying(m_hObject, pMainTracker, LTTRUE);
    g_pModelLT->UpdateMainTracker(m_hObject, fFrametime);// 0.005f);
    g_pModelLT->SetPlaying(m_hObject, pMainTracker, LTFALSE);