Skip to content

Broken tuning compatibility after vehicle model replacement (r23729) #4717

@ZbyK77

Description

@ZbyK77

Describe the bug

After replacing a vehicle model (even with the default/base vehicle model without any modifications), it becomes impossible to install certain tuning parts (verified with spoilers). The issue most likely appeared due to commit 3db6667.

If the vehicle already has a tuning part installed, that part disappears after the model is replaced. Additionally, getVehicleCompatibleUpgrades returns an incomplete list of compatible upgrades.

Steps to reproduce

  1. Check the list compatible upgrades
  2. Optional: Install a spoiler, e.g. 1003 (for the Sultan).
  3. Replace model
  4. Check the list again.
  5. Observe that the spoiler is gone and the list is incomplete :(

Or...

  1. Start resource 4l_test_tuning.zip
  2. /cv sultan (& enter)
  3. /add -> /check -> /replace -> /check

Version

Client: >= 1.6 23729

Additional context

r23728
(Before and after replacement)
Image

r23729
(Before)
Image

(After)
Image

Relevant log output

getVehicleCompatibleUpgrades(veh, 2) -- result { 1000, 1001, 1002, 1003, 1014, 1015, 1016, 1023, 1049, 1050, 1058, 1060, 1138, 1139, 1146, 1147, 1158, 1162, 1163, 1164 }
getVehicleUpgradeOnSlot(veh, 2) -- result 1003

engineReplaceModel(dff, 560)

getVehicleCompatibleUpgrades(veh, 2) -- result: { 1138, 1139 }
getVehicleUpgradeOnSlot(veh, 2) -- result: 0

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions