Skip to content

Refactor vehicle type resolution for CreateVehicleServerSetter - #1137

Open
DevPorphirio wants to merge 2 commits into
citizenfx:enhancedfrom
DevPorphirio:patch-1
Open

Refactor vehicle type resolution for CreateVehicleServerSetter#1137
DevPorphirio wants to merge 2 commits into
citizenfx:enhancedfrom
DevPorphirio:patch-1

Conversation

@DevPorphirio

Copy link
Copy Markdown

Summary

This PR refactors the client-side vehicle type resolution used by
CreateVehicleServerSetter().

No functional changes are intended.

Changes

  • Extract vehicle type resolution into a dedicated helper.
  • Improve documentation for mismatchedTypes.
  • Add defensive handling for unexpected vehicle classes.
  • Preserve the current behavior and fallback logic.

This should make future maintenance easier as new GTA DLC vehicles are introduced.

Extract vehicle type resolution into a dedicated helper to improve
readability and maintainability.

This change preserves the current behavior while centralizing the
logic used to determine the vehicle type required by
CreateVehicleServerSetter().

Also improves the documentation around the mismatchedTypes lookup
table and adds defensive handling for unexpected vehicle classes,
making future GTA DLC additions easier to diagnose.
@DevPorphirio
DevPorphirio requested a review from tabarra as a code owner August 7, 2026 02:00
- Add missing vehicle type overrides:
  - driftkeitora
  - towtruck3
  - towtruck4
- Reorder mismatchedTypes entries alphabetically for readability.
- Keep vehicle type corrections aligned with current GTA V Enhanced vehicle metadata.
@khnr5447-alt

Copy link
Copy Markdown

DIDOS

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.

2 participants