Fix animations progress & sync - #4821
Conversation
|
I'm not sure about the changes to |
|
On 64-bit Linux Maybe something like this instead? void WriteInt64(std::int64_t v)
{
Write(static_cast<uint>(static_cast<std::uint64_t>(v) >> 32));
Write(static_cast<uint>(static_cast<std::uint64_t>(v)));
}
bool ReadInt64(std::int64_t& v)
{
uint hi, lo;
if (!Read(hi) || !Read(lo))
return false;
v = static_cast<std::int64_t>((static_cast<std::uint64_t>(hi) << 32) | lo);
return true;
}Then the guard can go, but the call sites need switching over as well or Linux keeps picking |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
That's enough. I'll wait for a human review, because this will take forever with Copilot - just going around in circles constantly. Using AI was a mistake after all. |
Summary
setPedAnimationProgressnow runs in the "same" frame assetPedAnimation(setPedAnimationProgress() does not work when called in the same frame as setPedAnimation() #1172).setPedAnimationProgressis set to 0 on the server, it refreshes the animation startTime.setPedAnimationProgressupdates the animation startTime, ensuring all clients play the animation from the same progress point.Motivation
Fixes #1172
Test plan
Checklist