diff options
author | Aki <please@ignore.pl> | 2024-04-03 01:31:01 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2024-04-03 01:31:01 +0200 |
commit | e0f9f411056c235947b809cb21c477aa5acca1b4 (patch) | |
tree | 1371e376659d66ec0c881032b6001630aa4f964b /StarsEx/DebriefDlg.cpp | |
parent | 7f1e5f578ec184ebcbbdcd9f7725619ea426d5e4 (diff) | |
download | starshatter-e0f9f411056c235947b809cb21c477aa5acca1b4.zip starshatter-e0f9f411056c235947b809cb21c477aa5acca1b4.tar.gz starshatter-e0f9f411056c235947b809cb21c477aa5acca1b4.tar.bz2 |
Fixed mission points reward calculation
Diffstat (limited to 'StarsEx/DebriefDlg.cpp')
-rw-r--r-- | StarsEx/DebriefDlg.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/StarsEx/DebriefDlg.cpp b/StarsEx/DebriefDlg.cpp index 1cd919b..b613e3c 100644 --- a/StarsEx/DebriefDlg.cpp +++ b/StarsEx/DebriefDlg.cpp @@ -185,16 +185,9 @@ DebriefDlg::Show() ShipStats* stats = ShipStats::GetStats(i); if (stats && !strcmp(ship->Name(), stats->GetName())) { stats->Summarize(); - - Player* player = Player::GetCurrentPlayer(); - int points = stats->GetPoints() + stats->GetCommandPoints(); - - if (player && sim) - points = player->GetMissionPoints(stats, sim->StartTime()) + stats->GetCommandPoints(); - - char score[32]; - sprintf_s(score, "%d %s", points, ContentBundle::GetInstance()->GetText("DebriefDlg.points").data()); - mission_score->SetText(score); + const auto points = stats->EffectivePoints(); + mission_score->SetText(Text::format( + "%d %s", points, ContentBundle::GetInstance()->GetText("DebriefDlg.points").data())); break; } } |