summaryrefslogtreecommitdiffstats
path: root/src/audio/MusicManager.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-07-26 03:18:41 +0200
committerSergeanur <s.anureev@yandex.ua>2021-07-26 03:34:55 +0200
commita064b3a687b6ba4b112eaf1e69738b27358baabf (patch)
treeb2c214a4b9d27e10d99264b9d3ac742db9d202e2 /src/audio/MusicManager.cpp
parentFix aiming with flamethrower with PC controls (diff)
downloadre3-a064b3a687b6ba4b112eaf1e69738b27358baabf.tar
re3-a064b3a687b6ba4b112eaf1e69738b27358baabf.tar.gz
re3-a064b3a687b6ba4b112eaf1e69738b27358baabf.tar.bz2
re3-a064b3a687b6ba4b112eaf1e69738b27358baabf.tar.lz
re3-a064b3a687b6ba4b112eaf1e69738b27358baabf.tar.xz
re3-a064b3a687b6ba4b112eaf1e69738b27358baabf.tar.zst
re3-a064b3a687b6ba4b112eaf1e69738b27358baabf.zip
Diffstat (limited to 'src/audio/MusicManager.cpp')
-rw-r--r--src/audio/MusicManager.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp
index cb441622..815e55f2 100644
--- a/src/audio/MusicManager.cpp
+++ b/src/audio/MusicManager.cpp
@@ -236,23 +236,23 @@ cMusicManager::Initialise()
if (!IsInitialised()) {
time_t timevalue = time(0);
if (timevalue == -1) {
- pos = AudioManager.GetRandomNumber(0);
+ pos = AudioManager.m_anRandomTable[0];
} else {
tm *pTm = localtime(&timevalue);
if (pTm->tm_sec == 0)
- pTm->tm_sec = AudioManager.GetRandomNumber(0);
+ pTm->tm_sec = AudioManager.m_anRandomTable[0];
if (pTm->tm_min == 0)
- pTm->tm_min = AudioManager.GetRandomNumber(1);
+ pTm->tm_min = AudioManager.m_anRandomTable[1];
if (pTm->tm_hour == 0)
- pTm->tm_hour = AudioManager.GetRandomNumber(2);
+ pTm->tm_hour = AudioManager.m_anRandomTable[2];
if (pTm->tm_mday == 0)
- pTm->tm_mday = AudioManager.GetRandomNumber(3);
+ pTm->tm_mday = AudioManager.m_anRandomTable[3];
if (pTm->tm_mon == 0)
- pTm->tm_mon = AudioManager.GetRandomNumber(4);
+ pTm->tm_mon = AudioManager.m_anRandomTable[4];
if (pTm->tm_year == 0)
- pTm->tm_year = AudioManager.GetRandomNumber(3);
+ pTm->tm_year = AudioManager.m_anRandomTable[3];
if (pTm->tm_wday == 0)
- pTm->tm_wday = AudioManager.GetRandomNumber(2);
+ pTm->tm_wday = AudioManager.m_anRandomTable[2];
pos = pTm->tm_yday
* pTm->tm_wday
* pTm->tm_year
@@ -265,7 +265,7 @@ cMusicManager::Initialise()
for (int i = 0; i < TOTAL_STREAMED_SOUNDS; i++) {
m_aTracks[i].m_nLength = SampleManager.GetStreamedFileLength(i);
- m_aTracks[i].m_nPosition = pos * AudioManager.GetRandomNumber(i % 5) % m_aTracks[i].m_nLength;
+ m_aTracks[i].m_nPosition = pos * AudioManager.m_anRandomTable[i % 5] % m_aTracks[i].m_nLength;
m_aTracks[i].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
}
@@ -949,7 +949,7 @@ cMusicManager::GetCarTuning()
if (veh == nil) return RADIO_OFF;
if (UsesPoliceRadio(veh)) return POLICE_RADIO;
if (veh->m_nRadioStation == USERTRACK && !SampleManager.IsMP3RadioChannelAvailable())
- veh->m_nRadioStation = AudioManager.GetRandomNumber(2) % USERTRACK;
+ veh->m_nRadioStation = AudioManager.m_anRandomTable[2] % USERTRACK;
return veh->m_nRadioStation;
}