Skip to content

Fix setVehicleComponentVisible always showing the _ok state component#4688

Open
FileEX wants to merge 3 commits intomultitheftauto:masterfrom
FileEX:bugfix/vehicle_components_damage_status
Open

Fix setVehicleComponentVisible always showing the _ok state component#4688
FileEX wants to merge 3 commits intomultitheftauto:masterfrom
FileEX:bugfix/vehicle_components_damage_status

Conversation

@FileEX
Copy link
Member

@FileEX FileEX commented Feb 3, 2026

Summary

setVehicleComponentVisible always shows the undamaged atomic even if the component is damaged. This PR fixes that; now, the correct atomic is rendered depending on whether the component is damaged or not.

Motivation

#4687

Test plan

  1. Hit the vehicle against the wall to damage the hood.
  2. crun setVehicleComponentVisible(me.vehicle, 'bonnet_dummy', false)
  3. crun setVehicleComponentVisible(me.vehicle, 'bonnet_dummy', true) -- the normal hood is shown instead of the damaged one, even though the hood is destroyed.

Checklist

  • Your code should follow the coding guidelines.
  • Smaller pull requests are easier to review. If your pull request is beefy, your pull request should be reviewable commit-by-commit.

@FileEX FileEX requested a review from a team as a code owner February 3, 2026 21:24
@FileEX FileEX linked an issue Feb 3, 2026 that may be closed by this pull request
1 task
@FileEX FileEX added the bugfix Solution to a bug of any kind label Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Solution to a bug of any kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setVehicleComponentVisible shows the incorrect component

1 participant