diff options
author | aap <aap@papnet.eu> | 2020-05-17 20:20:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-17 20:20:14 +0200 |
commit | 8a7210cad162930e800f9632afd99ec15a75ebcf (patch) | |
tree | b4f2b7bcc798fbc86867839b00cb9b79fd6eecf1 /src/core/Stats.cpp | |
parent | loading screens (diff) | |
parent | Weapon fixes and thingies (diff) | |
download | re3-8a7210cad162930e800f9632afd99ec15a75ebcf.tar re3-8a7210cad162930e800f9632afd99ec15a75ebcf.tar.gz re3-8a7210cad162930e800f9632afd99ec15a75ebcf.tar.bz2 re3-8a7210cad162930e800f9632afd99ec15a75ebcf.tar.lz re3-8a7210cad162930e800f9632afd99ec15a75ebcf.tar.xz re3-8a7210cad162930e800f9632afd99ec15a75ebcf.tar.zst re3-8a7210cad162930e800f9632afd99ec15a75ebcf.zip |
Diffstat (limited to 'src/core/Stats.cpp')
-rw-r--r-- | src/core/Stats.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/Stats.cpp b/src/core/Stats.cpp index d50be0d5..ed3943c9 100644 --- a/src/core/Stats.cpp +++ b/src/core/Stats.cpp @@ -249,6 +249,14 @@ int32 CStats::FindCriminalRatingNumber() return rating; } +float CStats::GetPercentageProgress() +{ + float percentCompleted = (CStats::TotalProgressInGame == 0 ? 0 : + CStats::ProgressMade * 100.0f / (CGame::nastyGame ? CStats::TotalProgressInGame : CStats::TotalProgressInGame - 1.0f)); + + return Min(percentCompleted, 100.0f); +} + void CStats::SaveStats(uint8 *buf, uint32 *size) { CheckPointReachedSuccessfully(); |