mirror of
https://github.com/halpz/re3.git
synced 2025-01-06 20:05:27 +00:00
Merge remote-tracking branch 'origin/miami' into lcs
# Conflicts: # src/audio/AudioManager.cpp # src/core/Radar.cpp
This commit is contained in:
commit
2be8fcfa64
|
@ -2031,7 +2031,11 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh
|
||||||
CurrentPretendGear = 1;
|
CurrentPretendGear = 1;
|
||||||
bHandbrakeOnLastFrame = FALSE;
|
bHandbrakeOnLastFrame = FALSE;
|
||||||
}
|
}
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
if (CReplay::IsPlayingBack() || FindPlayerPed()->GetPedState() == PED_EXIT_CAR) {
|
||||||
|
#else
|
||||||
if (CReplay::IsPlayingBack()) {
|
if (CReplay::IsPlayingBack()) {
|
||||||
|
#endif
|
||||||
accelerateState = (255.0f * Clamp(params.m_pVehicle->m_fGasPedal, 0.0f, 1.0f));
|
accelerateState = (255.0f * Clamp(params.m_pVehicle->m_fGasPedal, 0.0f, 1.0f));
|
||||||
brakeState = (255.0f * Clamp(params.m_pVehicle->m_fBrakePedal, 0.0f, 1.0f));
|
brakeState = (255.0f * Clamp(params.m_pVehicle->m_fBrakePedal, 0.0f, 1.0f));
|
||||||
} else {
|
} else {
|
||||||
|
@ -8030,49 +8034,51 @@ cPedComments::Add(tPedComment *com)
|
||||||
{
|
{
|
||||||
uint8 index;
|
uint8 index;
|
||||||
|
|
||||||
if (m_nCommentsInBank[m_nActiveBank] >= NUM_PED_COMMENTS_SLOTS) {
|
// copypasted priority check from cAudioManager::AddSampleToRequestedQueue
|
||||||
index = m_nIndexMap[m_nActiveBank][NUM_PED_COMMENTS_SLOTS - 1];
|
|
||||||
if (m_asPedComments[m_nActiveBank][index].m_nVolume > com->m_nVolume)
|
if (m_nPedCommentCount[m_nActiveQueue] >= NUM_PED_COMMENTS_SLOTS) {
|
||||||
|
index = m_aPedCommentOrderList[m_nActiveQueue][NUM_PED_COMMENTS_SLOTS - 1];
|
||||||
|
if (m_aPedCommentQueue[m_nActiveQueue][index].m_nVolume > com->m_nVolume)
|
||||||
return;
|
return;
|
||||||
} else
|
} else
|
||||||
index = m_nCommentsInBank[m_nActiveBank]++;
|
index = m_nPedCommentCount[m_nActiveQueue]++;
|
||||||
|
|
||||||
m_asPedComments[m_nActiveBank][index] = *com;
|
m_aPedCommentQueue[m_nActiveQueue][index] = *com;
|
||||||
|
|
||||||
|
// this bit is basically copypasted cAudioManager::AddDetailsToRequestedOrderList
|
||||||
uint8 i = 0;
|
uint8 i = 0;
|
||||||
if (index != 0) {
|
if (index != 0) {
|
||||||
for (i = 0; i < index; i++) {
|
for (i = 0; i < index; i++) {
|
||||||
if (m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][i]].m_nVolume < m_asPedComments[m_nActiveBank][index].m_nVolume)
|
if (m_aPedCommentQueue[m_nActiveQueue][m_aPedCommentOrderList[m_nActiveQueue][i]].m_nVolume < m_aPedCommentQueue[m_nActiveQueue][index].m_nVolume)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i < index)
|
if (i < index)
|
||||||
memmove(&m_nIndexMap[m_nActiveBank][i + 1], &m_nIndexMap[m_nActiveBank][i], NUM_PED_COMMENTS_SLOTS - 1 - i);
|
memmove(&m_aPedCommentOrderList[m_nActiveQueue][i + 1], &m_aPedCommentOrderList[m_nActiveQueue][i], NUM_PED_COMMENTS_SLOTS - 1 - i);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_nIndexMap[m_nActiveBank][i] = index;
|
m_aPedCommentOrderList[m_nActiveQueue][i] = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cPedComments::Process()
|
cPedComments::Process()
|
||||||
{
|
{
|
||||||
uint32 sampleIndex;
|
uint32 sampleIndex;
|
||||||
uint8 actualUsedBank;
|
uint8 queue;
|
||||||
tPedComment *comment;
|
|
||||||
static uint8 counter = 0;
|
static uint8 counter = 0;
|
||||||
static int32 prevSamples[10] = { NO_SAMPLE, NO_SAMPLE, NO_SAMPLE, NO_SAMPLE, NO_SAMPLE, NO_SAMPLE, NO_SAMPLE, NO_SAMPLE, NO_SAMPLE, NO_SAMPLE };
|
static uint32 prevSamples[10] = { NO_SAMPLE, NO_SAMPLE, NO_SAMPLE, NO_SAMPLE, NO_SAMPLE, NO_SAMPLE, NO_SAMPLE, NO_SAMPLE, NO_SAMPLE, NO_SAMPLE };
|
||||||
|
|
||||||
if(AudioManager.m_bIsPaused) return;
|
if(AudioManager.m_bIsPaused) return;
|
||||||
|
|
||||||
if(m_nCommentsInBank[m_nActiveBank]) {
|
if(m_nPedCommentCount[m_nActiveQueue]) {
|
||||||
for(int i = 0; i < ARRAY_SIZE(prevSamples); i++) {
|
for(int i = 0; i < ARRAY_SIZE(prevSamples); i++) {
|
||||||
if(m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nSampleIndex ==
|
if(m_aPedCommentQueue[m_nActiveQueue][m_aPedCommentOrderList[m_nActiveQueue][0]].m_nSampleIndex ==
|
||||||
prevSamples[(counter + 1 + i) % ARRAY_SIZE(prevSamples)]) {
|
prevSamples[(counter + 1 + i) % ARRAY_SIZE(prevSamples)]) {
|
||||||
m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nProcess = -1;
|
m_aPedCommentQueue[m_nActiveQueue][m_aPedCommentOrderList[m_nActiveQueue][0]].m_nProcess = -1;
|
||||||
goto PedCommentAlreadyAdded;
|
goto PedCommentAlreadyAdded;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sampleIndex = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nSampleIndex;
|
sampleIndex = m_aPedCommentQueue[m_nActiveQueue][m_aPedCommentOrderList[m_nActiveQueue][0]].m_nSampleIndex;
|
||||||
switch(SampleManager.IsPedCommentLoaded(sampleIndex)) { // yes, this was a switch
|
switch(SampleManager.IsPedCommentLoaded(sampleIndex)) { // yes, this was a switch
|
||||||
case FALSE:
|
case FALSE:
|
||||||
#if defined(GTA_PC) && !defined(FIX_BUGS)
|
#if defined(GTA_PC) && !defined(FIX_BUGS)
|
||||||
|
@ -8081,13 +8087,13 @@ cPedComments::Process()
|
||||||
SampleManager.LoadPedComment(sampleIndex);
|
SampleManager.LoadPedComment(sampleIndex);
|
||||||
break;
|
break;
|
||||||
case TRUE:
|
case TRUE:
|
||||||
AudioManager.m_sQueueSample.m_nEntityIndex = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nEntityIndex;
|
AudioManager.m_sQueueSample.m_nEntityIndex = m_aPedCommentQueue[m_nActiveQueue][m_aPedCommentOrderList[m_nActiveQueue][0]].m_nEntityIndex;
|
||||||
AudioManager.m_sQueueSample.m_nCounter = 0;
|
AudioManager.m_sQueueSample.m_nCounter = 0;
|
||||||
AudioManager.m_sQueueSample.m_nSampleIndex = sampleIndex;
|
AudioManager.m_sQueueSample.m_nSampleIndex = sampleIndex;
|
||||||
AudioManager.m_sQueueSample.m_nBankIndex = SFX_BANK_PED_COMMENTS;
|
AudioManager.m_sQueueSample.m_nBankIndex = SFX_BANK_PED_COMMENTS;
|
||||||
AudioManager.m_sQueueSample.m_nPriority = 3;
|
AudioManager.m_sQueueSample.m_nPriority = 3;
|
||||||
AudioManager.m_sQueueSample.m_nVolume = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nVolume;
|
AudioManager.m_sQueueSample.m_nVolume = m_aPedCommentQueue[m_nActiveQueue][m_aPedCommentOrderList[m_nActiveQueue][0]].m_nVolume;
|
||||||
AudioManager.m_sQueueSample.m_fDistance = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_fDistance;
|
AudioManager.m_sQueueSample.m_fDistance = m_aPedCommentQueue[m_nActiveQueue][m_aPedCommentOrderList[m_nActiveQueue][0]].m_fDistance;
|
||||||
AudioManager.m_sQueueSample.m_nLoopCount = 1;
|
AudioManager.m_sQueueSample.m_nLoopCount = 1;
|
||||||
#ifndef GTA_PS2
|
#ifndef GTA_PS2
|
||||||
AudioManager.m_sQueueSample.m_nLoopStart = 0;
|
AudioManager.m_sQueueSample.m_nLoopStart = 0;
|
||||||
|
@ -8095,7 +8101,7 @@ cPedComments::Process()
|
||||||
#endif
|
#endif
|
||||||
#ifdef EXTERNAL_3D_SOUND
|
#ifdef EXTERNAL_3D_SOUND
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
AudioManager.m_sQueueSample.m_nEmittingVolume = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nEmittingVolume;
|
AudioManager.m_sQueueSample.m_nEmittingVolume = m_aPedCommentQueue[m_nActiveQueue][m_aPedCommentOrderList[m_nActiveQueue][0]].m_nEmittingVolume;
|
||||||
#else
|
#else
|
||||||
AudioManager.m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
|
AudioManager.m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
|
||||||
#endif // FIX_BUGS
|
#endif // FIX_BUGS
|
||||||
|
@ -8109,7 +8115,7 @@ cPedComments::Process()
|
||||||
#endif
|
#endif
|
||||||
AudioManager.m_sQueueSample.m_MaxDistance = 40.0f;
|
AudioManager.m_sQueueSample.m_MaxDistance = 40.0f;
|
||||||
AudioManager.m_sQueueSample.m_bStatic = TRUE;
|
AudioManager.m_sQueueSample.m_bStatic = TRUE;
|
||||||
AudioManager.m_sQueueSample.m_vecPos = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_vecPos;
|
AudioManager.m_sQueueSample.m_vecPos = m_aPedCommentQueue[m_nActiveQueue][m_aPedCommentOrderList[m_nActiveQueue][0]].m_vecPos;
|
||||||
#ifdef AUDIO_REVERB
|
#ifdef AUDIO_REVERB
|
||||||
AudioManager.m_sQueueSample.m_bReverb = TRUE;
|
AudioManager.m_sQueueSample.m_bReverb = TRUE;
|
||||||
#endif // AUDIO_REVERB
|
#endif // AUDIO_REVERB
|
||||||
|
@ -8131,7 +8137,7 @@ cPedComments::Process()
|
||||||
if (CTimer::GetIsSlowMotionActive())
|
if (CTimer::GetIsSlowMotionActive())
|
||||||
AudioManager.m_sQueueSample.m_nFrequency >>= 1;
|
AudioManager.m_sQueueSample.m_nFrequency >>= 1;
|
||||||
#endif
|
#endif
|
||||||
m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nProcess = -1;
|
m_aPedCommentQueue[m_nActiveQueue][m_aPedCommentOrderList[m_nActiveQueue][0]].m_nProcess = -1;
|
||||||
prevSamples[counter++] = sampleIndex;
|
prevSamples[counter++] = sampleIndex;
|
||||||
if(counter == 10) counter = 0;
|
if(counter == 10) counter = 0;
|
||||||
AudioManager.AddSampleToRequestedQueue();
|
AudioManager.AddSampleToRequestedQueue();
|
||||||
|
@ -8144,27 +8150,27 @@ cPedComments::Process()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PedCommentAlreadyAdded:
|
PedCommentAlreadyAdded:
|
||||||
// Switch bank
|
// Switch queue
|
||||||
if (m_nActiveBank == 0) {
|
if (m_nActiveQueue == 0) {
|
||||||
actualUsedBank = 0;
|
queue = 0;
|
||||||
m_nActiveBank = 1;
|
m_nActiveQueue = 1;
|
||||||
} else {
|
} else {
|
||||||
actualUsedBank = 1;
|
queue = 1;
|
||||||
m_nActiveBank = 0;
|
m_nActiveQueue = 0;
|
||||||
}
|
}
|
||||||
comment = m_asPedComments[actualUsedBank];
|
for (uint8 i = 0; i < m_nPedCommentCount[queue]; i++) {
|
||||||
for (uint32 i = 0; i < m_nCommentsInBank[actualUsedBank]; i++) {
|
if (m_aPedCommentQueue[queue][m_aPedCommentOrderList[queue][i]].m_nProcess > 0) {
|
||||||
if (m_asPedComments[actualUsedBank][m_nIndexMap[actualUsedBank][i]].m_nProcess > 0) {
|
m_aPedCommentQueue[queue][m_aPedCommentOrderList[queue][i]].m_nProcess--;
|
||||||
m_asPedComments[actualUsedBank][m_nIndexMap[actualUsedBank][i]].m_nProcess--;
|
Add(&m_aPedCommentQueue[queue][m_aPedCommentOrderList[queue][i]]);
|
||||||
Add(&comment[m_nIndexMap[actualUsedBank][i]]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (uint32 i = 0; i < NUM_PED_COMMENTS_SLOTS; i++) {
|
// clear queue
|
||||||
m_nIndexMap[actualUsedBank][i] = NUM_PED_COMMENTS_SLOTS;
|
for (uint8 i = 0; i < NUM_PED_COMMENTS_SLOTS; i++)
|
||||||
}
|
m_aPedCommentOrderList[queue][i] = NUM_PED_COMMENTS_SLOTS;
|
||||||
m_nCommentsInBank[actualUsedBank] = 0;
|
m_nPedCommentCount[queue] = 0;
|
||||||
#if defined(GTA_PC) && !defined(FIX_BUGS)
|
#if defined(GTA_PC) && !defined(FIX_BUGS)
|
||||||
if(m_bDelay)
|
if(m_bDelay)
|
||||||
if(CTimer::GetTimeInMilliseconds() - m_nDelayTimer > 6000) m_bDelay = FALSE;
|
if(CTimer::GetTimeInMilliseconds() - m_nDelayTimer > 6000) m_bDelay = FALSE;
|
||||||
|
|
|
@ -747,10 +747,9 @@ cAudioManager::AddDetailsToRequestedOrderList(uint8 sample)
|
||||||
m_aRequestedQueue[m_nActiveQueue][sample].m_nFinalPriority)
|
m_aRequestedQueue[m_nActiveQueue][sample].m_nFinalPriority)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (i < sample) {
|
if (i < sample)
|
||||||
memmove(&m_aRequestedOrderList[m_nActiveQueue][i + 1], &m_aRequestedOrderList[m_nActiveQueue][i], m_nActiveSamples - i - 1);
|
memmove(&m_aRequestedOrderList[m_nActiveQueue][i + 1], &m_aRequestedOrderList[m_nActiveQueue][i], m_nActiveSamples - i - 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
m_aRequestedOrderList[m_nActiveQueue][i] = sample;
|
m_aRequestedOrderList[m_nActiveQueue][i] = sample;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -770,23 +769,30 @@ cAudioManager::AddReflectionsToRequestedQueue()
|
||||||
uint32 oldCounter = m_sQueueSample.m_nCounter;
|
uint32 oldCounter = m_sQueueSample.m_nCounter;
|
||||||
float oldDist = m_sQueueSample.m_fDistance;
|
float oldDist = m_sQueueSample.m_fDistance;
|
||||||
CVector oldPos = m_sQueueSample.m_vecPos;
|
CVector oldPos = m_sQueueSample.m_vecPos;
|
||||||
|
#ifndef USE_TIME_SCALE_FOR_AUDIO
|
||||||
if ( CTimer::GetIsSlowMotionActive() ) {
|
if ( CTimer::GetIsSlowMotionActive() ) {
|
||||||
emittingVolume = m_sQueueSample.m_nVolume;
|
emittingVolume = m_sQueueSample.m_nVolume;
|
||||||
oldFreq = m_sQueueSample.m_nFrequency;
|
oldFreq = m_sQueueSample.m_nFrequency;
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
emittingVolume = (9 * m_sQueueSample.m_nVolume) / 16;
|
emittingVolume = (9 * m_sQueueSample.m_nVolume) / 16;
|
||||||
}
|
|
||||||
m_sQueueSample.m_MaxDistance /= 2.f;
|
m_sQueueSample.m_MaxDistance /= 2.f;
|
||||||
|
|
||||||
uint32 halfOldFreq = oldFreq >> 1;
|
uint32 halfOldFreq = oldFreq >> 1;
|
||||||
|
|
||||||
for (uint32 i = 0; i < ARRAY_SIZE(m_afReflectionsDistances); i++) {
|
for (uint32 i = 0; i < ARRAY_SIZE(m_afReflectionsDistances); i++) {
|
||||||
|
#ifndef USE_TIME_SCALE_FOR_AUDIO
|
||||||
if ( CTimer::GetIsSlowMotionActive() )
|
if ( CTimer::GetIsSlowMotionActive() )
|
||||||
m_afReflectionsDistances[i] = (m_anRandomTable[i % 4] % 3) * 50.f / 8.f;
|
m_afReflectionsDistances[i] = (m_anRandomTable[i % 4] % 3) * 50.f / 8.f;
|
||||||
|
#endif
|
||||||
|
|
||||||
reflectionDistance = m_afReflectionsDistances[i];
|
reflectionDistance = m_afReflectionsDistances[i];
|
||||||
if (reflectionDistance > 0.0f && reflectionDistance < 100.f && reflectionDistance < m_sQueueSample.m_MaxDistance) {
|
if (reflectionDistance > 0.0f && reflectionDistance < 100.f && reflectionDistance < m_sQueueSample.m_MaxDistance) {
|
||||||
|
#ifndef USE_TIME_SCALE_FOR_AUDIO
|
||||||
m_sQueueSample.m_nReflectionDelay = CTimer::GetIsSlowMotionActive() ? (reflectionDistance * 600.f / 1029.f) : (reflectionDistance * 300.f / 1029.f);
|
m_sQueueSample.m_nReflectionDelay = CTimer::GetIsSlowMotionActive() ? (reflectionDistance * 600.f / 1029.f) : (reflectionDistance * 300.f / 1029.f);
|
||||||
|
#else
|
||||||
|
m_sQueueSample.m_nReflectionDelay = reflectionDistance * 300.f / 1029.f;
|
||||||
|
#endif
|
||||||
if (m_sQueueSample.m_nReflectionDelay > 3) {
|
if (m_sQueueSample.m_nReflectionDelay > 3) {
|
||||||
m_sQueueSample.m_fDistance = m_afReflectionsDistances[i];
|
m_sQueueSample.m_fDistance = m_afReflectionsDistances[i];
|
||||||
SET_EMITTING_VOLUME(emittingVolume);
|
SET_EMITTING_VOLUME(emittingVolume);
|
||||||
|
@ -795,9 +801,12 @@ cAudioManager::AddReflectionsToRequestedQueue()
|
||||||
if (m_sQueueSample.m_nVolume > emittingVolume / 16) {
|
if (m_sQueueSample.m_nVolume > emittingVolume / 16) {
|
||||||
m_sQueueSample.m_nCounter = oldCounter + (i + 1) * 256;
|
m_sQueueSample.m_nCounter = oldCounter + (i + 1) * 256;
|
||||||
if (m_sQueueSample.m_nLoopCount > 0) {
|
if (m_sQueueSample.m_nLoopCount > 0) {
|
||||||
|
#ifndef USE_TIME_SCALE_FOR_AUDIO
|
||||||
if ( CTimer::GetIsSlowMotionActive() ) {
|
if ( CTimer::GetIsSlowMotionActive() ) {
|
||||||
m_sQueueSample.m_nFrequency = halfOldFreq + ((halfOldFreq * i) / ARRAY_SIZE(m_afReflectionsDistances));
|
m_sQueueSample.m_nFrequency = halfOldFreq + ((halfOldFreq * i) / ARRAY_SIZE(m_afReflectionsDistances));
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
noise = RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
|
noise = RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
|
||||||
if (noise > 0)
|
if (noise > 0)
|
||||||
m_sQueueSample.m_nFrequency -= noise;
|
m_sQueueSample.m_nFrequency -= noise;
|
||||||
|
|
|
@ -99,10 +99,10 @@ VALIDATE_SIZE(tPedComment, 28);
|
||||||
class cPedComments
|
class cPedComments
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
tPedComment m_asPedComments[NUM_PED_COMMENTS_BANKS][NUM_PED_COMMENTS_SLOTS];
|
tPedComment m_aPedCommentQueue[NUM_SOUND_QUEUES][NUM_PED_COMMENTS_SLOTS];
|
||||||
uint8 m_nIndexMap[NUM_PED_COMMENTS_BANKS][NUM_PED_COMMENTS_SLOTS];
|
uint8 m_aPedCommentOrderList[NUM_SOUND_QUEUES][NUM_PED_COMMENTS_SLOTS];
|
||||||
uint8 m_nCommentsInBank[NUM_PED_COMMENTS_BANKS];
|
uint8 m_nPedCommentCount[NUM_SOUND_QUEUES];
|
||||||
uint8 m_nActiveBank;
|
uint8 m_nActiveQueue;
|
||||||
#ifdef GTA_PC
|
#ifdef GTA_PC
|
||||||
bool8 m_bDelay;
|
bool8 m_bDelay;
|
||||||
uint32 m_nDelayTimer;
|
uint32 m_nDelayTimer;
|
||||||
|
@ -111,14 +111,14 @@ public:
|
||||||
cPedComments()
|
cPedComments()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < NUM_PED_COMMENTS_SLOTS; i++)
|
for (int i = 0; i < NUM_PED_COMMENTS_SLOTS; i++)
|
||||||
for (int j = 0; j < NUM_PED_COMMENTS_BANKS; j++) {
|
for (int j = 0; j < NUM_SOUND_QUEUES; j++) {
|
||||||
m_asPedComments[j][i].m_nProcess = -1;
|
m_aPedCommentQueue[j][i].m_nProcess = -1;
|
||||||
m_nIndexMap[j][i] = NUM_PED_COMMENTS_SLOTS;
|
m_aPedCommentOrderList[j][i] = NUM_PED_COMMENTS_SLOTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < NUM_PED_COMMENTS_BANKS; i++)
|
for (int i = 0; i < NUM_SOUND_QUEUES; i++)
|
||||||
m_nCommentsInBank[i] = 0;
|
m_nPedCommentCount[i] = 0;
|
||||||
m_nActiveBank = 0;
|
m_nActiveQueue = 0;
|
||||||
}
|
}
|
||||||
void Add(tPedComment *com);
|
void Add(tPedComment *com);
|
||||||
void Process();
|
void Process();
|
||||||
|
|
|
@ -806,7 +806,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
|
||||||
flags = pPed->m_pMyVehicle->m_nNumMaxPassengers != 0 ? CAR_DOOR_FLAG_LF : CAR_DOOR_FLAG_LF | CAR_DOOR_FLAG_LR;
|
flags = pPed->m_pMyVehicle->m_nNumMaxPassengers != 0 ? CAR_DOOR_FLAG_LF : CAR_DOOR_FLAG_LF | CAR_DOOR_FLAG_LR;
|
||||||
break;
|
break;
|
||||||
case CAR_DOOR_LR:
|
case CAR_DOOR_LR:
|
||||||
flags = pPed->m_pMyVehicle->m_nNumMaxPassengers != 0 ? CAR_DOOR_FLAG_RF : CAR_DOOR_FLAG_LF | CAR_DOOR_FLAG_LR;
|
flags = pPed->m_pMyVehicle->m_nNumMaxPassengers != 0 ? CAR_DOOR_FLAG_LR : CAR_DOOR_FLAG_LF | CAR_DOOR_FLAG_LR;
|
||||||
break;
|
break;
|
||||||
case CAR_DOOR_RF:
|
case CAR_DOOR_RF:
|
||||||
flags = CAR_DOOR_FLAG_RF;
|
flags = CAR_DOOR_FLAG_RF;
|
||||||
|
|
|
@ -1573,7 +1573,7 @@ CRadar::ToggleTargetMarker(float x, float y)
|
||||||
ms_RadarTrace[nextBlip].m_bDim = 0;
|
ms_RadarTrace[nextBlip].m_bDim = 0;
|
||||||
ms_RadarTrace[nextBlip].m_bInUse = 1;
|
ms_RadarTrace[nextBlip].m_bInUse = 1;
|
||||||
ms_RadarTrace[nextBlip].m_Radius = 1.0f;
|
ms_RadarTrace[nextBlip].m_Radius = 1.0f;
|
||||||
CVector pos(x, y, CWorld::FindGroundZForCoord(x,y));
|
CVector pos(x, y, 0.0f);
|
||||||
TargetMarkerPos = pos;
|
TargetMarkerPos = pos;
|
||||||
ms_RadarTrace[nextBlip].m_vec2DPos = pos;
|
ms_RadarTrace[nextBlip].m_vec2DPos = pos;
|
||||||
ms_RadarTrace[nextBlip].m_vecPos = pos;
|
ms_RadarTrace[nextBlip].m_vecPos = pos;
|
||||||
|
|
|
@ -129,7 +129,6 @@ enum Config {
|
||||||
NUMINVISIBLEENTITIES = 150,
|
NUMINVISIBLEENTITIES = 150,
|
||||||
|
|
||||||
NUM_AUDIOENTITY_EVENTS = 4,
|
NUM_AUDIOENTITY_EVENTS = 4,
|
||||||
NUM_PED_COMMENTS_BANKS = 2,
|
|
||||||
NUM_PED_COMMENTS_SLOTS = 20,
|
NUM_PED_COMMENTS_SLOTS = 20,
|
||||||
|
|
||||||
NUM_SOUND_QUEUES = 2,
|
NUM_SOUND_QUEUES = 2,
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include "CarCtrl.h"
|
#include "CarCtrl.h"
|
||||||
#include "Population.h"
|
#include "Population.h"
|
||||||
#include "IniFile.h"
|
#include "IniFile.h"
|
||||||
|
#include "Zones.h"
|
||||||
|
|
||||||
#include "crossplatform.h"
|
#include "crossplatform.h"
|
||||||
|
|
||||||
|
@ -771,12 +772,14 @@ FixCar(void)
|
||||||
static void
|
static void
|
||||||
TeleportToWaypoint(void)
|
TeleportToWaypoint(void)
|
||||||
{
|
{
|
||||||
if (FindPlayerVehicle()) {
|
if (CRadar::TargetMarkerId == -1)
|
||||||
if (CRadar::TargetMarkerId != -1)
|
return;
|
||||||
FindPlayerVehicle()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, FindPlayerVehicle()->GetColModel()->boundingSphere.center.z));
|
CEntity* pEntityToTeleport = FindPlayerEntity();
|
||||||
} else
|
CVector vNewPos = CRadar::TargetMarkerPos;
|
||||||
if(CRadar::TargetMarkerId != -1)
|
CStreaming::LoadScene(vNewPos);
|
||||||
FindPlayerPed()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, FEET_OFFSET));
|
CStreaming::LoadSceneCollision(vNewPos);
|
||||||
|
vNewPos.z = CWorld::FindGroundZForCoord(vNewPos.x, vNewPos.y) + pEntityToTeleport->GetDistanceFromCentreOfMassToBaseOfModel();
|
||||||
|
pEntityToTeleport->Teleport(vNewPos);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -821,7 +821,9 @@ public:
|
||||||
void RestorePreviousObjective(void);
|
void RestorePreviousObjective(void);
|
||||||
void SetIdle(void);
|
void SetIdle(void);
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
#if _MSC_VER >= 1920 && _MSC_VER < 1929
|
||||||
__declspec(noinline) // workaround for a compiler bug, hooray MS :P
|
__declspec(noinline) // workaround for a compiler bug, hooray MS :P
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
void SetObjective(eObjective, void*);
|
void SetObjective(eObjective, void*);
|
||||||
void SetObjective(eObjective);
|
void SetObjective(eObjective);
|
||||||
|
|
Loading…
Reference in a new issue