summaryrefslogtreecommitdiffhomepage
path: root/StarsEx/DebriefDlg.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2024-04-03 01:31:01 +0200
committerAki <please@ignore.pl>2024-04-03 01:31:01 +0200
commite0f9f411056c235947b809cb21c477aa5acca1b4 (patch)
tree1371e376659d66ec0c881032b6001630aa4f964b /StarsEx/DebriefDlg.cpp
parent7f1e5f578ec184ebcbbdcd9f7725619ea426d5e4 (diff)
downloadstarshatter-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.cpp13
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;
}
}