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

feat: persistent player vehicles #568

Merged
merged 16 commits into from
Sep 19, 2024
Merged

feat: persistent player vehicles #568

merged 16 commits into from
Sep 19, 2024

Conversation

Manason
Copy link
Member

@Manason Manason commented Sep 14, 2024

fixes #567

Implements design as described in #567

  • Tested
  • persistence is disabled by default, requires convar to opt-in.
  • Changed places where we delete a vehicle in core to use the new core export.
  • We'll need to change other Qbox resources to use the DeleteVehicle export to delete vehicles. This export allows the vehicle to be deleted without being respawned by persistence and works even if persistence is disabled via convar.

Adds new exports

  • EnablePersistence
  • DisablePersistence
  • DeleteVehicle

@mafewtm
Copy link
Member

mafewtm commented Sep 14, 2024

I don't think qbx_core should be dependent on qbx_vehicles

@Manason
Copy link
Member Author

Manason commented Sep 14, 2024

I don't think qbx_core should be dependent on qbx_vehicles

qbx_vehicles is an API resource so I think it's fine to depend on it. The alternative is to make qbx_vehicles have a client component instead of server o Lu. Do you think that would be better?

fxmanifest.lua Outdated Show resolved Hide resolved
client/vehicle-persistence.lua Show resolved Hide resolved
@Manason Manason requested a review from solareon September 17, 2024 19:05
client/vehicle-persistence.lua Show resolved Hide resolved
client/vehicle-persistence.lua Show resolved Hide resolved
@Manason Manason requested a review from solareon September 18, 2024 04:02
Copy link
Member

@D4isDAVID D4isDAVID left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we maybe also warp passengers back to the new vehicle?

modules/lib.lua Outdated Show resolved Hide resolved
server/vehicle-persistence.lua Outdated Show resolved Hide resolved
@Manason
Copy link
Member Author

Manason commented Sep 18, 2024

Should we maybe also warp passengers back to the new vehicle?

Done. Still need to test this however.

@Manason Manason merged commit db3b000 into main Sep 19, 2024
4 checks passed
@Manason Manason deleted the feat-vehicle-persistence branch September 19, 2024 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Persistent Vehicles
4 participants