Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Persistent vehicle spawn doesn't check for duplicate #433

Open
lucasmorais99 opened this issue Aug 2, 2023 · 0 comments
Open

Persistent vehicle spawn doesn't check for duplicate #433

lucasmorais99 opened this issue Aug 2, 2023 · 0 comments

Comments

@lucasmorais99
Copy link

Hello -

When using Athena.vehicle.spawn.persistent(), the underlying code doesn't actually check if the vehicle is already spawned. It uses Athena.document.vehicle.exists(), which checks if a vehicle exists, but not if it is spawned.

Thus, I suggest that line 74 of src/core/server/vehicle/spawn.ts gets changed to:
Athena.vehicle.get.spawnedVehicleByDocumentID()

This way, the spawn system actually checks if the vehicle is spawned, rather than if a document exists for it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant