View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002929 | FSSCP | user interface | public | 2013-09-30 01:26 | 2014-06-14 10:43 |
Reporter | niffiwan | Assigned To | niffiwan | ||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.7.1 | ||||
Summary | 0002929: pilot rank icons in barracks do not switch correctly between single & multi | ||||
Description | see summary | ||||
Steps To Reproduce | enter the barracks find a pilot with a different rank between single & multi player select the problem pilot switch between single & multiplayer notice that while the rank icon is OK when you initially enter the barracks, after the 1st switch the icons become switched i.e. if single has 2 pips and multi has 1, after switching it'll display 2 for multi & 1 for single | ||||
Additional Information | I should attempt to recreate this problem with a fresh pilot (once 2906 is fixed of course!) | ||||
Tags | No tags attached. | ||||
|
mantis ate my post :| In summary: 1) The rank data is read from all pilot PLR files in pilotfile::verify (called from barracks_pilot_filter() used in as filter in cf_get_file_list_preallocated) 2) This rank data is only updated when PLR's are saved 3) during a single/multi switch only the current pilot is load/saved at the end of the switch, meaning outdated rank data being read for the rank pips 4) the rest of the pilots are not load/saved when switching between single/multi in the barracks 5) 2 cases to be fixed; clicking the single/multi buttons, and pressing the TAB key I think the solution is to change pilotfile::verify to read the real rank from the pilot, either multi_stats (PLR) or p->stats (CSG). Since non-selected pilots displayed in the barracks are not required to have a valid campaign in the current mod, a fallback will be needed for the single-player campaign rank. |
|
OR! Both the multi rank and the "current" single rank could be saved in the PLR flags section that is read by pilotfile::verify. I like that solution a lot more than reading more data from the pilotfiles. |
|
This has got to have been one of the most finicky and annoying trivialities I've run across! Patch ready for review here: https://github.com/scp-fs2open/fs2open.github.com/pull/32 If you're testing, you'll need to ensure your pilots CSG are saved in the correct format before you can see the bug being fixed correctly. |
|
Have commented on the Github issue. |
|
Fix committed to trunk@10818. |
fs2open: trunk r10818 2014-06-14 07:02 Ported: N/A Details Diff |
Fix mantis 2929 Save shortcut rank to the csg flags & bump csg version Add function to read the csg rank during pilotfile::verify() Reorder 'find pilots' call so that Game_mode is valid for verify |
Affected Issues 0002929 |
|
mod - /trunk/fs2_open/code/menuui/barracks.cpp | Diff File | ||
mod - /trunk/fs2_open/code/pilotfile/csg.cpp | Diff File | ||
mod - /trunk/fs2_open/code/pilotfile/csg_convert.cpp | Diff File | ||
mod - /trunk/fs2_open/code/pilotfile/pilotfile.h | Diff File | ||
mod - /trunk/fs2_open/code/pilotfile/plr.cpp | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-09-30 01:26 | niffiwan | New Issue | |
2013-10-14 01:29 | niffiwan | Assigned To | => niffiwan |
2013-10-14 01:29 | niffiwan | Status | new => assigned |
2013-10-14 02:41 | niffiwan | Note Added: 0015328 | |
2014-05-26 21:07 | niffiwan | Note Added: 0015766 | |
2014-05-29 09:12 | niffiwan | Note Added: 0015771 | |
2014-05-29 09:12 | niffiwan | Status | assigned => code review |
2014-06-14 07:31 | Echelon9 | Note Added: 0015862 | |
2014-06-14 10:43 | niffiwan | Changeset attached | => fs2open trunk r10818 |
2014-06-14 10:43 | niffiwan | Note Added: 0015869 | |
2014-06-14 10:43 | niffiwan | Status | code review => resolved |
2014-06-14 10:43 | niffiwan | Resolution | open => fixed |