mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-19 00:35:59 +01:00
A control defined again in the same cab section of the .mmd with the block key "duplicate: yes" no longer replaces the control: the first definition stays the control (sounds, type, command feedback), and the duplicate adds a copy with its own submodel, animation type and scale / offset, following the control's value and active state. The duplicate's sound keys are ignored so the control is not heard twice, and clicking any copy works the control. This lets e.g. the ASF cab move its second master controller and reverser with the first ones. Without the key a repeated definition still replaces the earlier one, as some of the game's .mmd files repeat controls with other submodels. A duplicate with no definition of the control loaded from the current cab's models before it is just the control. clear_cab_controls() now also clears ggCompressorListButton, which kept the previous cab's submodel. The rule is in vehicle/gaugeduplicates.h, covered by tests/unit/test_gauge_duplicates.cpp. (eu07/maszyna#527)
2.1 KiB
2.1 KiB