File tree Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -40,10 +40,10 @@ class CVehicleAudioSettingsEntrySA final : public CVehicleAudioSettingsEntry
4040 CVehicleAudioSettingsEntrySA (tVehicleAudioSettings* pSettings) { m_Settings = *pSettings; };
4141 ~CVehicleAudioSettingsEntrySA () = default ;
4242
43- tVehicleAudioSettings* getInterface () { return & m_Settings; };
43+ const tVehicleAudioSettings& getInterface () const noexcept { return m_Settings; };
4444
4545 void Assign (const tVehicleAudioSettings& settings) noexcept { m_Settings = settings; }
46- void Assign (const CVehicleAudioSettingsEntry* settings) noexcept { m_Settings = static_cast <const CVehicleAudioSettingsEntrySA*>(settings)->m_Settings ; };
46+ void Assign (const CVehicleAudioSettingsEntry* settings) noexcept { m_Settings = static_cast <const CVehicleAudioSettingsEntrySA*>(settings)->getInterface () ; };
4747
4848 eVehicleSoundType GetSoundType () const noexcept override { return m_Settings.m_eVehicleSoundType ; };
4949 short GetEngineOnSoundBankID () const noexcept override { return m_Settings.m_nEngineOnSoundBankId ; };
Original file line number Diff line number Diff line change @@ -912,18 +912,8 @@ void CVehicleSA::SetEngineOn(bool bEngineOn)
912912
913913bool CVehicleSA::IsPassenger (CPed* pPed)
914914{
915- DWORD dwThis = (DWORD)m_pInterface;
916- DWORD dwFunc = FUNC_CVehicle_IsPassenger;
917- bool bReturn = false ;
918-
919- _asm
920- {
921- mov ecx, dwThis
922- push pPed
923- call dwFunc
924- mov bReturn, al
925- }
926- return bReturn;
915+ using FUNC_CVehicle_IsPassenger_t = bool (__thiscall*)(CVehicleSAInterface* self, CPedSAInterface* ped);
916+ return ((FUNC_CVehicle_IsPassenger_t)(FUNC_CVehicle_IsPassenger))(GetVehicleInterface (), pPed->GetPedInterface ());
927917}
928918
929919CPed* CVehicleSA::GetDriver ()
You can’t perform that action at this time.
0 commit comments