diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-05-17 19:36:48 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-05-17 20:01:52 +0200 |
commit | 84f8312b8666b2774eafbbb0e6d034ba598fd69c (patch) | |
tree | a901ba3684ab78346f415a6a4d3920312fb92c84 /src/core/Stats.cpp | |
parent | Weapon fixes (diff) | |
download | re3-84f8312b8666b2774eafbbb0e6d034ba598fd69c.tar re3-84f8312b8666b2774eafbbb0e6d034ba598fd69c.tar.gz re3-84f8312b8666b2774eafbbb0e6d034ba598fd69c.tar.bz2 re3-84f8312b8666b2774eafbbb0e6d034ba598fd69c.tar.lz re3-84f8312b8666b2774eafbbb0e6d034ba598fd69c.tar.xz re3-84f8312b8666b2774eafbbb0e6d034ba598fd69c.tar.zst re3-84f8312b8666b2774eafbbb0e6d034ba598fd69c.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(); |