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

Hidden default vehicle components are being redisplayed when changing handling/variant/parts states(fix) #3888

Open
1 task done
C0DELEVEL opened this issue Dec 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@C0DELEVEL
Copy link

C0DELEVEL commented Dec 15, 2024

Describe the bug

Hey,

if we hide one of the default vehicle components, e.g., bump_rear_dummy, using the setVehicleComponentVisible function and then change the vehicle's variant, modify its handling value, or fix the vehicle (fixVehicle), all default components ignore the fact that they were hidden using setVehicleComponentVisible and are displayed again.

This becomes a significant challenge when using the component system for vehicle tuning, especially if we want to implement it optimally without sending unnecessary data between the server and frequently analyzing and updating the current components status.

As for proposed solutions to address this issue, I see two options:

  1. Add client-side awareness of hidden components for a given vehicle so that they remain hidden during vehicle reinitialization. This would prevent them from being displayed again after events like handling changes, variant switches, or fixes.
  2. Introduce a new event, e.g., onVehicleInitialized or onVehicleReinitialized, which would allow us to reapply the appropriate visibility settings for components whenever the vehicle is reinitialized due to the aforementioned reasons.

Steps to reproduce

  1. Create vehicle
  2. Hide one of default components, eg.: setVehicleComponentVisible(veh,'bump_rear_dummy',false)
  3. Switch variant or change handling or fixVehicle, eg.: setVehicleVariant(veh,1,1)
  4. That's it! You will see the bump_rear_dummy component visible again

Version

latest, not relevant

Additional context

No response

Relevant log output

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.
@C0DELEVEL C0DELEVEL added the bug Something isn't working label Dec 15, 2024
@FileEX
Copy link
Contributor

FileEX commented Dec 15, 2024

This seems similar to #1556 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants