From f1febb6911599aa5a01f4e81fca49a690c376eed Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Tue, 20 Aug 2024 22:58:42 +0800 Subject: [PATCH] [saco] Implement/match `CVehicle::SetEngineState(...)` --- saco/game/vehicle.cpp | 13 +++++++++++++ saco/game/vehicle.h | 1 + 2 files changed, 14 insertions(+) diff --git a/saco/game/vehicle.cpp b/saco/game/vehicle.cpp index 6507c88..083464c 100644 --- a/saco/game/vehicle.cpp +++ b/saco/game/vehicle.cpp @@ -79,3 +79,16 @@ void CVehicle::SetLockedState(int iLocked) //----------------------------------------------------------- +void CVehicle::SetEngineState(BOOL bState) +{ + if(!m_pVehicle) return; + + if(!bState) { + m_pVehicle->byteFlags &= 0xDF; + } else { + m_pVehicle->byteFlags |= 0x20; + } +} + +//----------------------------------------------------------- + diff --git a/saco/game/vehicle.h b/saco/game/vehicle.h index 3fb40b5..35f6d92 100644 --- a/saco/game/vehicle.h +++ b/saco/game/vehicle.h @@ -24,6 +24,7 @@ public: BOOL HasADriver(); + void SetEngineState(BOOL bState); void LinkToInterior(int iInterior);