summaryrefslogtreecommitdiff
path: root/src/weapons
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-11-23 00:00:53 +0200
committerSergeanur <s.anureev@yandex.ua>2020-12-01 23:38:36 +0200
commit43d583139478a07b5d3fd8c5b318135bff4bb9b7 (patch)
treeb518af1c18e4cda0655bf8e7ba84e74428e74aa0 /src/weapons
parenta259b6b8ab7124b68bbc0f0b80c5560a672a502a (diff)
cAudioManager::ProcessPedOneShots + fixes
Diffstat (limited to 'src/weapons')
-rw-r--r--src/weapons/Weapon.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp
index 20ada534..d1f9490d 100644
--- a/src/weapons/Weapon.cpp
+++ b/src/weapons/Weapon.cpp
@@ -36,9 +36,6 @@
#include "Sprite.h"
#include "Pickups.h"
-// TODO(Miami)
-#define AUDIO_NOT_READY
-
float fReloadAnimSampleFraction[5] = { 0.5f, 0.7f, 0.75f, 0.75f, 0.7f };
float fSeaSparrowAimingAngle = 10.0f;
float fHunterAimingAngle = 30.0f;
@@ -2899,26 +2896,15 @@ CWeapon::Update(int32 audioEntity, CPed *pedToAdjustSound)
default:
break;
}
- if (reloadAssoc->GetProgress() >= soundStart && (reloadAssoc->currentTime - reloadAssoc->timeStep) / reloadAssoc->hierarchy->totalLength < soundStart) {
-#ifdef AUDIO_NOT_READY
- DMAudio.PlayOneShot(audioEntity, SOUND_WEAPON_RELOAD, 0.0f);
-#else
+ if (reloadAssoc->GetProgress() >= soundStart && (reloadAssoc->currentTime - reloadAssoc->timeStep) / reloadAssoc->hierarchy->totalLength < soundStart)
DMAudio.PlayOneShot(audioEntity, SOUND_WEAPON_RELOAD, m_eWeaponType);
-#endif
- }
if (CTimer::GetTimeInMilliseconds() > m_nTimer && reloadAssoc->GetProgress() < 0.9f) {
m_nTimer = CTimer::GetTimeInMilliseconds();
}
} else {
uint32 timePassed = m_nTimer - CWeaponInfo::ms_aReloadSampleTime[m_eWeaponType];
if (CTimer::GetPreviousTimeInMilliseconds() < timePassed && CTimer::GetTimeInMilliseconds() >= timePassed)
- {
-#ifdef AUDIO_NOT_READY
- DMAudio.PlayOneShot(audioEntity, SOUND_WEAPON_RELOAD, 0.0f);
-#else
DMAudio.PlayOneShot(audioEntity, SOUND_WEAPON_RELOAD, m_eWeaponType);
-#endif
- }
}
}