Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spawning vehicle with warp can fail to set vehicle properties #501

Closed
Manason opened this issue Jul 1, 2024 · 0 comments · Fixed by #502
Closed

Spawning vehicle with warp can fail to set vehicle properties #501

Manason opened this issue Jul 1, 2024 · 0 comments · Fixed by #502
Labels
bug Something isn't working need repro This bug report needs confirmation

Comments

@Manason
Copy link
Contributor

Manason commented Jul 1, 2024

Summary

When the warping client isn't the entity owner, the vehicle properties seem to fail to set

Reproduction

  1. Have two clients in close proximity
  2. 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

@Manason Manason added bug Something isn't working need repro This bug report needs confirmation labels Jul 1, 2024
@qbox-duck qbox-duck bot added this to Issues Jul 1, 2024
@github-project-automation github-project-automation bot moved this to Todo in Issues Jul 1, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Issues Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need repro This bug report needs confirmation
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant