Files
fs2open.github.com/code/weapon
MageKing17 7184fbe781 Delay processing "$Player Weapon Precedence:" until after parsing. (#4201)
The `stuff_int_list()` call converts the weapon names into the appropriate index into the `Weapon_info` array; however, in `weapon_do_post_parse()`, we call `weapon_sort_by_type()`, which reorders the array; this makes these indices potentially point to the wrong weapon. Additionally, there's no protection against someone `+remove`ing one of the weapons in the list in a later TBM.

This commit makes it so we instead store the names into a vector of strings, then convert them into indices after `weapon_sort_by_type()` has already been called. Additionally, `Player_weapon_precedence` is changed from a fixed-size array to a vector, since it's usually not as long as `MAX_WEAPON_TYPES`.

Fixes #4199.
2022-04-23 14:55:36 -07:00
..
2020-03-14 09:56:56 -04:00
2021-03-15 18:30:47 -04:00
2020-11-18 13:26:18 -05:00
2021-10-02 04:40:03 +09:00
2021-01-28 22:33:01 -05:00
2021-01-27 12:43:32 -05:00