FWGS / hlsdk-portable

Portable Half-Life SDK. GoldSource and Xash3D. Crossplatform.
https://xash.su
Other
272 stars 125 forks source link

Client weapons prediction compatibility with original DLLs #363

Open a1batross opened 1 year ago

a1batross commented 1 year ago

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.

xorusr commented 1 year ago

Ok

FreeSlave commented 1 year ago

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.

a1batross commented 1 year ago

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: @.***>