Page MenuHomeFeedback Tracker

animateDoor synchronization in MP is very slow for non-local vehicles
Feedback, NormalPublic

Description

Observed this in Spearhead but also occurs in GM and mods that use animateDoor for vehicle hatches and the like.

I'm not sure if it's a bug or if 'as designed' but either way it leads to undesirable results.

The problem is the 'animateDoor' script command seems to have very low network priority, where it can take upwards of 6-10 seconds for the script command to take effect over the network.

This is noticeble in the following scenario:
Self-hosted server, and a client (running on same PC)
Vehicle with the previously mentioned hatch animateDoor usage
Client enters the vehicle as a driver therefore making the vehicle local to them.
Server Client stays outside and observes
Client turns out from the driver position, this will be animated with animateDoor. On their end the hatch opens as per expected and works correctly.
On the server end the unit is turned out, but the hatch remains closed. This stays this way for multiple seconds before the command 'catches up' and the hatch opens as per normal.

If animateDoor is remoteExec or otherwise run locally (like a client entering another clients vehicle, and turning out themselves) the command behaves as expected

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

dedmen added a subscriber: dedmen.Jul 23 2024, 11:11 AM

The answer is simple.
There is no door state synchronization :D
It is sent when other things are synchronized, but for the door state itself, there is no check if it needs sync. So changing it doesn't trigger a sync

That explains the variability in sync time then... Any chance it can get it like animateSource does, or suggestions to force a sync? (I guess remoteExecing it)

dedmen changed the task status from New to Feedback.Jul 23 2024, 12:13 PM

I fixed it now.
You can either remoteExec it, or change some other state of the vehicle to force it to update.