[OneSync] Ghost vehicle

Artifacts: 4394 and 4998
Build: 2189
Bug: I am Player 128 and i own the vehicle 2892, i change bucket and after 10 seconds i come back to my original bucket,
the vehicle has been transfered to the Player 31, while he “owns” the vehicle when i try to enter it bugs (ghost vehicle, stuck at enter animation)
After i regain the ownership the vehicle “unbugs” and i can enter the vehicle normally.

1 Like

Any approximate coords for both players and the vehicle?

We were (me, other player, vehicle) in a radius of ~20.0 units

1 Like

I’m trying to replicate this but I can’t seem to manage to get this to happen - each time I get near, or worst case, try to enter the vehicle, the player who originally owned the vehicle reowns it relatively instantly.

Do you (or does anyone else) have any more precise reproduction steps?

1 Like

I have a few questions regarding this…

Question 1:

  • One player1 in bucket 1, and one player2 in bucket 2. Player1 has one vehicle and changes to bucket 3, what will happen to vehicle? Is it possible that the vehicle gets assigned to the player2 and changes randomly to bucket 2?

Question 2:

  • Player1 has one vehicle and then randomly loses control of it and goes to another player in a diferent bucket?

Question 3:

  • Player1 has a vehicle and is in the same bucket as Player2. Is it possible that for some reason they both control the vehicle and it gets duplicated?

Question 4:

  • Player1 was in bucket 2, returns to bucket 1 and tries to get control of a vehicle, suddenly the vehicle goes to bucket 2… Is this possible?

All of these questions are in a scenario of around 800 players in a server.

Also, the players are experiencing really bad fps spikes when there are lots of “onPlayerJoining”… Is it possible to mitigate this issue, or only spreading the players will help?

Another video:

https://streamable.com/w55x1y

You don’t seem to be OP at all, so how is it ‘regarding this’?

Why would an entity ‘change randomly’? ‘Possible’, yes, but this would be a bug if so.

Is this a question? Seems more like a statement describing a potential bug.

Shouldn’t be, may be a bug, in which case you should provide reproduction steps or other info, same with the one above.

Same answer as the last ‘question’.

The player count shouldn’t matter for ‘questions’ at all, behavior should be the same no matter the player count.

Are you just providing vague repro-less bug reports as ‘questions’ for some reason, or what is your goal?

Who knows? You’ve yet again not provided any info, .etl files or anything. What did you even use to indicate ‘lots of onPlayerJoining’?

I can’t view video files, but what are you trying to accomplish with your posts?

They’re not actionable at all, seem unrelated to the topic, and if you’re just phrasing hypothetical questions, I really don’t understand your point.

Without having reproduction steps, scoped logging, or knowing what your script code is doing in regards to routing buckets, none of this can really be answered.

1 Like

My goal is report some bugs and try to get them fixed, and sorry if I didn’t provide repros for those bugs.

All my questions where in an hypothetical situation because I don’t know if what I’m describing (based on what I see in my server) is actually what is happening.

Those videos are really important for you to see, how can I send them for you to watch?

I think having 800 players is really diferent because there are more entities and vehicles around the map than a server with 2 players.

Just to clarify players never change routing buckets inside vehicles, but they can change as offten as they want. Also they can only spawn vehicles in the main routing bucket and never in other buckets.

The code to spawn the vehicle is:

		local vehicle = CreateVehicle(model, coords.x, coords.y, coords.z, heading, true, false)

		SetEntityAsMissionEntity(vehicle, true, true)
		SetVehicleHasBeenOwnedByPlayer(vehicle, true)

And then I send the vehicle to server side,

TriggerServerEvent('gframework:storeVehicleData', plate, NetworkGetNetworkIdFromEntity(vehicle))

When the vehicle disappears from the client, when I check if the entity still exists (server side) it returns
true

local currentVehicle = NetworkGetEntityFromNetworkId(id)
print(DoesEntityExist(currentVehicle))

Regarding the “lots of onPlayerJoining” I’m gonna do an .etl file and then send it here.

Thank you!

After a lot of searching looks like the problem is getting caused by SetPlayerCullingRadius.
I also found a relevant post with probably the same issue: https://forum.cfx.re/t/reduced-culling-radius-creates-entity-state-ownership-issues/