Commit e567ae7
authored
Fix warning of unbound keys for newer controls (#7173)
* Fix warning of unbound keys for newer controls
Under some circumstances, FSO will warn the player if a key is unbound if that they need to press to complete a training event. This logic though only works for keys with XSTRs from 507-619. Any control that was added with a different XSTR will not be picked up correctly, and thus the message displayed to the player will be incorrect, confusing, and not helpful.
To fix this `missiontraining.cpp` around line 757 needs to account for the newer controls as well.
This PR adds those needed checks, and this fixes the issue. This fix is especially needed for mods that use training missions with newer controls such as FotG. Note, we do ship with a full default controls table with all the needed keys bound, but we have found players will be players and simply change all their controls before even starting the training missions. Thus they unbind key training controls, and with this bug they are unable to correct their controls. With this fix they are properly able to update their controls as needed to complete the training missions.
Fixes #7172.
* var name update1 parent 46d3e49 commit e567ae7
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
757 | 765 | | |
758 | 766 | | |
759 | | - | |
760 | | - | |
| 767 | + | |
761 | 768 | | |
762 | 769 | | |
763 | 770 | | |
| |||
0 commit comments