Conversation
|
Districh-ru
left a comment
There was a problem hiding this comment.
Hi @ihhub, I tester some SW and PoL campaigns and found one rendering bug to and add one check or assertion. Could you please check the comments I left in your spare time?
| const Campaign::ScenarioInfoId & currentScenarioInfoId = campaignSaveData.getCurrentScenarioInfoId(); | ||
| const std::vector<Campaign::ScenarioData> & scenarios = campaignData.getAllScenarios(); | ||
| const Campaign::ScenarioData & scenario = scenarios[currentScenarioInfoId.scenarioId]; | ||
|
|
There was a problem hiding this comment.
Should we check (or assert) scenarios.size() > currentScenarioInfoId.scenarioId?
| } | ||
|
|
||
| // Fade-out screen before loading a scenario. | ||
| fheroes2::fadeOutDisplay(); |
There was a problem hiding this comment.
When I restart scenario from the File dialog two fade-outs occur:
fheroes2.2026-04-04.21-16-13-957.mp4
We can pass const bool needDisplayFadeOut to execute this line only when starting a new game but not restarting from the adventure map because the adventure map also fades out when we leave it.
Or (possibly a better solution) - update the condition in game_startgame.cpp line 966: if ( res != fheroes2::GameMode::HIGHSCORES_STANDARD && res != fheroes2::GameMode::START_GAME) {
| break; | ||
| } | ||
|
|
||
| // TODO: restart the campaign here. |
There was a problem hiding this comment.
We can remove this comment now.
relates to #1528