Spawning vehicle with warp can fail to set vehicle properties
Closed this issue · 0 comments
Manason commented
Summary
When the warping client isn't the entity owner, the vehicle properties seem to fail to set
Reproduction
- Have two clients in close proximity
- run spawnrepo a few times until the license plate of the spawned vehicle is not 'TEST'
RegisterCommand('spawnrepro', function(source)
qbx.spawnVehicle({ spawnSource = vec4(228.5577, -802.1774, 30.5724, 159.7563), model = 'adder', props = {plate = 'TEST'}, warp = GetPlayerPed(source)})
end)
Expected behavior
The license plate of the spawned vehicle is 'TEST' since that's the property that was passed in.
Actual behavior
The license plate has a chance of not being 'TEST'
Additional context
This occurs when the vehicle entity owner is the client who is not running the spawnrepro command. I suspect there is a race condition that takes away ownership before the properties can be set, leading to default GTA properties instead, although I haven't been able to nail down a root cause.
Current Version
v1.15.0
Custom Resources
N/A