diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-04-18 13:56:21 +0300 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-04-18 13:56:21 +0300 |
commit | 89688843ece0f6c9968f0f8b9b644d707b96d34a (patch) | |
tree | aed6e50c2275fa46ddecb808b282222dbcc1561a /src | |
parent | d6314f9564912393134d832b8cc268dd3dbfcbaa (diff) |
bug fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/audio/MusicManager.cpp | 6 | ||||
-rw-r--r-- | src/core/Frontend.cpp | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp index 2cc1d929..01b7df56 100644 --- a/src/audio/MusicManager.cpp +++ b/src/audio/MusicManager.cpp @@ -51,6 +51,12 @@ cMusicManager::PlayerInCar() if(State == PED_DRAG_FROM_CAR || State == PED_EXIT_CAR || State == PED_ARRESTED) return false; + if (!FindPlayerVehicle()) + return true; + + if (FindPlayerVehicle()->m_status == STATUS_WRECKED) + return false; + switch(FindPlayerVehicle()->m_modelIndex) { case MI_FIRETRUCK: case MI_AMBULAN: diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index e9282c44..4dab8ae4 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -5470,7 +5470,8 @@ CMenuManager::ConstructStatLine(int rowIdx) if (player.m_nTotalPackages != 0) packagesPercent = player.m_nCollectedPackages * 100.0f / player.m_nTotalPackages; - STAT_LINE("PERPIC", &packagesPercent, 0, &(nTemp = 100)); + int nPackagesPercent = packagesPercent; + STAT_LINE("PERPIC", &nPackagesPercent, 0, &(nTemp = 100)); STAT_LINE("NOUNIF", &CStats::TotalNumberOfUniqueJumps, 0, &CStats::NumberOfUniqueJumpsFound); STAT_LINE("DAYSPS", &CStats::DaysPassed, false, nil); if (CGame::nastyGame) { |