summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-18 12:56:21 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-18 12:56:21 +0200
commit89688843ece0f6c9968f0f8b9b644d707b96d34a (patch)
treeaed6e50c2275fa46ddecb808b282222dbcc1561a /src/audio
parentRevert "Part one" (diff)
downloadre3-89688843ece0f6c9968f0f8b9b644d707b96d34a.tar
re3-89688843ece0f6c9968f0f8b9b644d707b96d34a.tar.gz
re3-89688843ece0f6c9968f0f8b9b644d707b96d34a.tar.bz2
re3-89688843ece0f6c9968f0f8b9b644d707b96d34a.tar.lz
re3-89688843ece0f6c9968f0f8b9b644d707b96d34a.tar.xz
re3-89688843ece0f6c9968f0f8b9b644d707b96d34a.tar.zst
re3-89688843ece0f6c9968f0f8b9b644d707b96d34a.zip
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/MusicManager.cpp6
1 files changed, 6 insertions, 0 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: