Tug tow bar

This commit is contained in:
Silent 2018-06-05 21:07:42 +02:00
parent 03482f0779
commit aeb9a76e00
No known key found for this signature in database
GPG key ID: AE53149BB0C45AF1
3 changed files with 16 additions and 0 deletions

View file

@ -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()

View file

@ -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

View file

@ -294,6 +294,7 @@ public:
virtual void PreRender() override;
void Fix_SilentPatch();
RwFrame* GetTowBarFrame() const;
static void (CAutomobile::*orgAutomobilePreRender)();
static float ms_engineCompSpeed;