mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-28 23:03:01 +05:00
Planes don't need ResetFrames() so they got a separate method
This commit is contained in:
parent
0b8cfdd7db
commit
e44a901a27
3 changed files with 16 additions and 3 deletions
|
@ -1430,7 +1430,7 @@ __forceinline void Patch_SA_10()
|
||||||
// but not on Vortex
|
// but not on Vortex
|
||||||
Patch<BYTE>(0x6CABD0, 0xEB);
|
Patch<BYTE>(0x6CABD0, 0xEB);
|
||||||
Patch<DWORD>(0x6CAC05, 0x5E5FCF8B);
|
Patch<DWORD>(0x6CAC05, 0x5E5FCF8B);
|
||||||
InjectHook(0x6CAC09, &CAutomobile::Fix_SilentPatch, PATCH_JUMP);
|
InjectHook(0x6CAC09, &CPlane::Fix_SilentPatch, PATCH_JUMP);
|
||||||
|
|
||||||
|
|
||||||
// Zones fix
|
// Zones fix
|
||||||
|
|
|
@ -220,6 +220,18 @@ void CPlane::Render()
|
||||||
CVehicle::Render();
|
CVehicle::Render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CPlane::Fix_SilentPatch()
|
||||||
|
{
|
||||||
|
// Reset bouncing panels
|
||||||
|
for ( int i = 0; i < 3; i++ )
|
||||||
|
{
|
||||||
|
// No reset on Vortex
|
||||||
|
if ( i == 0 && m_nModelIndex == 539 )
|
||||||
|
continue;
|
||||||
|
m_aBouncingPanel[i].m_nNodeIndex = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CAutomobile::Fix_SilentPatch()
|
void CAutomobile::Fix_SilentPatch()
|
||||||
{
|
{
|
||||||
ResetFrames();
|
ResetFrames();
|
||||||
|
@ -228,8 +240,7 @@ void CAutomobile::Fix_SilentPatch()
|
||||||
for ( int i = 0; i < 3; i++ )
|
for ( int i = 0; i < 3; i++ )
|
||||||
{
|
{
|
||||||
// Towtruck/Tractor fix
|
// Towtruck/Tractor fix
|
||||||
// + no reset on Vortex
|
if ( i == 0 && ((m_nModelIndex == 525 && m_pCarNode[21]) || (m_nModelIndex == 531 && m_pCarNode[17])) )
|
||||||
if ( i == 0 && ((m_nModelIndex == 525 && m_pCarNode[21]) || (m_nModelIndex == 531 && m_pCarNode[17]) || m_nModelIndex == 539) )
|
|
||||||
continue;
|
continue;
|
||||||
m_aBouncingPanel[i].m_nNodeIndex = -1;
|
m_aBouncingPanel[i].m_nNodeIndex = -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,6 +164,8 @@ public:
|
||||||
{ CPlane::Render(); }
|
{ CPlane::Render(); }
|
||||||
|
|
||||||
virtual void Render() override;
|
virtual void Render() override;
|
||||||
|
|
||||||
|
void Fix_SilentPatch();
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(CBouncingPanel) == 0x20, "Wrong size: CBouncingPanel");
|
static_assert(sizeof(CBouncingPanel) == 0x20, "Wrong size: CBouncingPanel");
|
||||||
|
|
Loading…
Reference in a new issue