Skip to content

Commit 8b30d7a

Browse files
committed
Reset vehicle explosion timer in SetHealth (Fixes #2272)
1 parent ff93fec commit 8b30d7a

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

Client/game_sa/CVehicleSA.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,10 @@ void CVehicleSA::SetHealth(FLOAT fHealth)
14951495
auto vehicle = static_cast<CAutomobileSAInterface*>(GetInterface());
14961496
vehicle->m_nHealth = fHealth;
14971497
if (fHealth >= 250.0f)
1498+
{
14981499
vehicle->m_fBurningTime = 0.0f;
1500+
vehicle->m_delayedExplosionTimer = 0;
1501+
}
14991502
}
15001503

15011504
// SHould be plane funcs

Client/game_sa/CVehicleSA.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,19 @@ class CVehicleSAInterface : public CPhysicalSAInterface
406406
CVehicleSAInterface* m_towingVehicle; // 1220
407407
CVehicleSAInterface* m_trailerVehicle; // 1224
408408

409+
CPedSAInterface* m_bombPlanter; // 1228
410+
uint32_t m_deleteAfterTime; // 1232
411+
uint32_t m_lastGunFireTime; // 1236
412+
uint32_t m_lastBlowUpTime; // 1240
413+
uint16_t m_policeChaseLeaveCarTimer; // 1244
414+
uint16_t m_delayedExplosionTimer; // 1246
415+
void* m_responsibleForDetonation; // 1250
416+
float m_frontGroundZ; // 1254
417+
float m_rearGroundZ; // 1258
418+
409419
/*** BEGIN SECTION that was added by us ***/
410-
BYTE Padding200[37]; // 1228
411-
CVehicle* m_pVehicle; // 1268
420+
uint8_t _padding1262[6]; // 1262
421+
CVehicle* m_pVehicle; // 1268
412422
/*** END SECTION that was added by us ***/
413423

414424
// 1272

0 commit comments

Comments
 (0)