View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006233 | The Dark Mod | GUI | public | 16.01.2023 06:50 | 16.01.2023 22:04 |
Reporter | Daft Mugi | Assigned To | stgatilov | ||
Priority | normal | Severity | normal | Reproducibility | always |
Status | closed | Resolution | duplicate | ||
Product Version | SVN | ||||
Target Version | TDM 2.11 | Fixed in Version | TDM 2.11 | ||
Summary | 0006233: Incorrect difficulty highlighted after mission completion | ||||
Description | After a mission is completed and the player navigates back to the objectives screen, it will have the first difficulty (easiest) selected on the left even though the objectives list shows a different difficulty level. | ||||
Steps To Reproduce | To reproduce (method 1): 1. Start mission on difficulty 1 or 2. 2. Complete mission. 3. Click "Start This Mission". 4. On the objectives screen, difficulty 0 will be highlighted but have difficulty 1 or 2 as its objectives list. To reproduce (method 2), if you already have a "Mission Final Save" save: 1. Load "Mission Final Save" save that either has difficulty 1 or 2. 2. Click "Start This Mission". 3. On the objectives screen, difficulty 0 will be highlighted but have difficulty 1 or 2 as its objectives list. | ||||
Additional Information | The main issue is that after completing a mission, the GUI windowDefs are not reinitialized with the proper "forecolor". The "diffSelect" is set properly, but the "Difficulty0", "Difficulty1", "Difficulty2" windowDefs do not get the corresponding "forecolor". | ||||
Tags | No tags attached. | ||||
I've attached a patch. It is meant to be paired with the patch for 0006229. r10247-fix-objective-screen.diff (940 bytes)
diff --git game/Objectives/MissionData.cpp game/Objectives/MissionData.cpp index db0f87f..2794032 100644 --- game/Objectives/MissionData.cpp +++ game/Objectives/MissionData.cpp @@ -2460,6 +2460,11 @@ void CMissionData::HandleMainMenuCommands(const idStr& cmd, idUserInterface* gui // Let the GUI know what the current difficulty level is gui->SetStateInt("diffSelect", gameLocal.m_DifficultyManager.GetDifficultyLevel()); + // #6233: ResetWindowTime is needed for reinitializing which difficulty is selected + gui->ResetWindowTime("Difficulty0"); + gui->ResetWindowTime("Difficulty1"); + gui->ResetWindowTime("Difficulty2"); + // Clear the flag so that the objectives get updated ClearGUIState(); } @@ -2806,4 +2811,4 @@ void CMissionData::SetSecretsFound( float secrets ) void CMissionData::SetSecretsTotal( float secrets ) { m_Stats.secretsTotal = (int)secrets; -} \ No newline at end of file +} |
|
svn rev 16740 from 0006229 also fixes that. No need to hack C++ code, just do all initialization every time. BTW, there is console command "tdm_end_mission" which is useful for reproducing such things. |
|
Are you sure it works for you? It never works for me, because the "forecolor" does not get set correctly. Thank you for teaching me about "tdm_end_mission" as that also puts the GUI in the bugged state. 0006229 does not fix it. For example, when "diffSelect 2", Difficulty0 always has its "forecolor" set to 1,1,1,1 with the difficulty 2 objective list. The only way I found to make the "forecolor" match the "diffSelect" state was to reset its timer, because "onTime 0" has the logic to set the "forecolor" correctly. I think there should be a better way than resetting the timer, though. Even though "diffSelect" and "gameLocal.m_DifficultyManager" are set correctly, the nav items do not have the correct "forecolor". How can the "forecolor" be set correctly after mission completion? |
|
Thank you for sharing the changed file in 0006229. My first test was a success! I'm happy that the C++ is not necessary. =) |
|
Date Modified | Username | Field | Change |
---|---|---|---|
16.01.2023 06:50 | Daft Mugi | New Issue | |
16.01.2023 06:51 | Daft Mugi | Relationship added | related to 0006229 |
16.01.2023 07:02 | Daft Mugi | Note Added: 0015783 | |
16.01.2023 07:02 | Daft Mugi | File Added: r10247-fix-objective-screen.diff | |
16.01.2023 08:39 | stgatilov | Note Added: 0015786 | |
16.01.2023 09:27 | Daft Mugi | Note Added: 0015788 | |
16.01.2023 21:01 | Daft Mugi | Note Added: 0015792 | |
16.01.2023 22:03 | stgatilov | Relationship replaced | duplicate of 0006229 |
16.01.2023 22:04 | stgatilov | Target Version | => TDM 2.11 |
16.01.2023 22:04 | stgatilov | Assigned To | => stgatilov |
16.01.2023 22:04 | stgatilov | Status | new => closed |
16.01.2023 22:04 | stgatilov | Resolution | open => duplicate |
16.01.2023 22:04 | stgatilov | Fixed in Version | => TDM 2.11 |