hlsdk-portable icon indicating copy to clipboard operation
hlsdk-portable copied to clipboard

Client weapons prediction compatibility with original DLLs

Open a1batross opened this issue 2 years ago • 3 comments

I noticed that this change breaks prediction with original DLLs.

cc @FreeSlave See how it calls shared random in original HLSDK, the calls to shared random is supposed to be equal between client and server weapons code. We also better not change anything in animation state for compatibility too.

Changes in weapons code should be revised to find other instances of broken prediction.

a1batross avatar Apr 06 '23 14:04 a1batross

Ok

xorusr avatar Apr 06 '23 14:04 xorusr

m_pPlayer->m_flNextAttack and m_flTimeWeaponIdle get overriden by DefaultDeploy anyway. I'm not sure if UTIL_SharedRandomFloat must be done on both sides though.

FreeSlave avatar Apr 06 '23 20:04 FreeSlave

It's synchronized each prediction frame. It's probably harmless, as no other calls would be done after that but still better keep that in mind.

чт, 6 апр. 2023 г., 23:12 Roman Chistokhodov @.***>:

m_pPlayer->m_flNextAttack and m_flTimeWeaponIdle get overriden by DefaultDeploy anyway. I'm not sure if UTIL_SharedRandomFloat must be done on both sides though.

— Reply to this email directly, view it on GitHub https://github.com/FWGS/hlsdk-portable/issues/363#issuecomment-1499561193, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYQTAM5LL25A6EAYEGLMUDW74PTVANCNFSM6AAAAAAWVPEZ7U . You are receiving this because you authored the thread.Message ID: @.***>

a1batross avatar Apr 06 '23 20:04 a1batross