[BUG] SetPlayerRoutingBucket <=> Flying vehicle

Here’s a funny one, in terms of how the bug actually plays out in the game :smile:

It’s really easy to repro. You leave a vehicle as passenger with another player as driver where the engine is on

Exit the vehicle as passenger, then use SetPlayerRoutingBucket and reset it to 0 (on the passenger player), then we have the bug;
Whenever the passenger (re-)enters any car, it will make the car fly around and go nuts :chestnut: (and will repeat to do that with any car you enter onwards)

As passenger I’ve been able to repro this every time, as driver it doesn’t seem to be a 100% - might be due to being solo on the server, can’t tell.

Hope this is helpful :pray:

Can you record it?

… do you maybe have a prop attached to either ped that isn’t being transitioned along?

The matter of fact, yes that could very much be the case.

We have two “prop” scenarios;

  1. We attach weapon-props on the player PED, to visual show that players have a weapon (inspired from this: GitHub - iQuadCore/realweapons: realweapons plugin for fivem (version without RAM leaks))

  2. Players can “bring out” various props for roleplaying with the “DPEmotes” resource: GitHub - andristum/dpemotes: Emotes / Animations for fiveM with Prop support.

Can we do something ourself to mitigate this, other than set the ped model again, as this will drop attached props? or can/will FiveM do something to prevent this? :smiling_face:

We mitigate this by informing the scripts that attach props that a routing bucket change is about to happen, so they can detach and delete props and then re-attach once the change has occurred.

We also iterate through entities as a catch-all and delete/detach anything attached to the player ped.

Would you care to share a snippet? :blush:

Just on the server side sent a client event telling the client what routing bucket they need to go to, on the client deal with detaching objects, sent a event back telling the server to change bucket, then tell client back that the bucket has been changed and re-attach any objects.

1 Like