Running script part 3

This commit is contained in:
Nikolay Korolev
2019-07-25 23:34:29 +03:00
parent 60364f11da
commit 5acce16261
19 changed files with 758 additions and 21 deletions

View File

@ -5,7 +5,7 @@
float &fShapeLength = *(float*)0x600E78;
float &fShapeTime = *(float*)0x600E7C;
float &fRangeMult = *(float*)0x600E80; //0.6f; // 0.75f gta 3
float &fTimeMult = *(float*)0xA0FCF4;
float &fTimeMult = *(float*)0x943008;
float MAX_WAKE_LENGTH = 50.0f;
float MIN_WAKE_INTERVAL = 1.0f;

View File

@ -377,12 +377,13 @@ CVehicle::ProcessDelayedExplosion(void)
return;
int tick = CTimer::GetTimeStep()/60.0f*1000.0f;
int16 prev = m_nBombTimer;
if(tick > m_nBombTimer)
m_nBombTimer = 0;
else
m_nBombTimer -= tick;
if(IsCar() && ((CAutomobile*)this)->m_bombType == CARBOMB_TIMEDACTIVE && (m_nBombTimer & 0xFE00) != 0xFE00)
if(IsCar() && ((CAutomobile*)this)->m_bombType == CARBOMB_TIMEDACTIVE && (m_nBombTimer & 0xFE00) != (prev & 0xFE00))
DMAudio.PlayOneShot(m_audioEntityId, SOUND_CAR_BOMB_TICK, 0.0f);
if (m_nBombTimer != 0)