diff --git a/SilentPatchSA/SilentPatchSA.cpp b/SilentPatchSA/SilentPatchSA.cpp index d17a7ac..5396010 100644 --- a/SilentPatchSA/SilentPatchSA.cpp +++ b/SilentPatchSA/SilentPatchSA.cpp @@ -3753,6 +3753,11 @@ void Patch_SA_10() // DFT-30 wheel, Sweeper brushes and other typos in hierarchy InjectHook( 0x4C5311, HierarchyTypoFix::strcasecmp ); + + + // Tug tow bar (misc_b instead of misc_a + Nop( 0x6AF2CC, 1 ); + InjectHook( 0x6AF2CC + 1, &CAutomobile::GetTowBarFrame, PATCH_CALL ); } void Patch_SA_11() diff --git a/SilentPatchSA/VehicleSA.cpp b/SilentPatchSA/VehicleSA.cpp index 1066a91..c798dce 100644 --- a/SilentPatchSA/VehicleSA.cpp +++ b/SilentPatchSA/VehicleSA.cpp @@ -480,6 +480,16 @@ void CPlane::PreRender() } } +RwFrame* CAutomobile::GetTowBarFrame() const +{ + RwFrame* towBar = m_pCarNode[20]; + if ( towBar == nullptr ) + { + towBar = m_pCarNode[21]; + } + return towBar; +} + void CAutomobile::PreRender() { // For rotating engine components diff --git a/SilentPatchSA/VehicleSA.h b/SilentPatchSA/VehicleSA.h index e870b23..c60d1a5 100644 --- a/SilentPatchSA/VehicleSA.h +++ b/SilentPatchSA/VehicleSA.h @@ -294,6 +294,7 @@ public: virtual void PreRender() override; void Fix_SilentPatch(); + RwFrame* GetTowBarFrame() const; static void (CAutomobile::*orgAutomobilePreRender)(); static float ms_engineCompSpeed;