From 87f9d8b63aea9199713c46ffe77d7d43d62a7908 Mon Sep 17 00:00:00 2001 From: Silent Date: Thu, 2 Apr 2020 17:31:04 +0200 Subject: [PATCH] Fixed a conflict with Heli & Plane Collision fix in III --- SilentPatchIII/SilentPatchIII.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/SilentPatchIII/SilentPatchIII.cpp b/SilentPatchIII/SilentPatchIII.cpp index 00b5f1d..afa29cc 100644 --- a/SilentPatchIII/SilentPatchIII.cpp +++ b/SilentPatchIII/SilentPatchIII.cpp @@ -1230,13 +1230,16 @@ void Patch_III_Common() // Give chopper/escape a properly sized collision bounding box instead of using ped's { - static constexpr CColModel colModelChopper( CColSphere( 8.5f, CVector(0.0f, -1.75f, 0.73f), 0, 0 ), - CColBox( CVector(-2.18f, -8.52f, -0.67f), CVector(-2.18f, 4.58f, 2.125f), 0, 0 ) ); + auto initHelisPattern = pattern( "C6 40 2C 00 A1" ).count_hint(1); + if ( initHelisPattern.size() == 1 ) + { + static constexpr CColModel colModelChopper( CColSphere( 8.5f, CVector(0.0f, -1.75f, 0.73f), 0, 0 ), + CColBox( CVector(-2.18f, -8.52f, -0.67f), CVector(-2.18f, 4.58f, 2.125f), 0, 0 ) ); - auto initHelis = pattern( "C6 40 2C 00 A1" ).get_one(); - - Patch( initHelis.get( -7 + 3 ), &colModelChopper ); - Patch( initHelis.get( 9 + 3 ), &colModelChopper ); + auto initHelis = initHelisPattern.get_one(); + Patch( initHelis.get( -7 + 3 ), &colModelChopper ); + Patch( initHelis.get( 9 + 3 ), &colModelChopper ); + } } }