1515
1616extern CGameSA* pGame;
1717
18+ using namespace CarNodes ;
19+ using namespace VehicleFeatures ;
20+
1821CAutomobileSA::CAutomobileSA (CAutomobileSAInterface* pInterface)
1922{
2023 SetInterface (pInterface);
@@ -47,7 +50,7 @@ void CAutomobileSAInterface::SetPanelDamage(std::uint8_t panelId, bool breakGlas
4750 if ((pHandlingData->uiModelFlags & 0x10000000 ) != 0 ) // check bouncePanels flag
4851 return ;
4952
50- if (node != CarNodes::Enum:: WINDSCREEN && node != CarNodes::Enum:: WING_LF && node != CarNodes::Enum:: WING_RF)
53+ if (node != WINDSCREEN && node != WING_LF && node != WING_RF)
5154 {
5255 // Get free bouncing panel
5356 for (auto & panel : m_panels)
@@ -99,17 +102,17 @@ void CAutomobileSA::PreRender_End(CAutomobileSAInterface* vehicleInterface)
99102 return ;
100103
101104 // Simple turret like in fire truck
102- if (vehicle->pEntity ->IsSpecialFeatureEnabled (VehicleFeatures::Enum:: WATER_CANNON) && !vehicle->pEntity ->IsSpecialFeatureEnabled (VehicleFeatures::Enum:: TURRET))
105+ if (vehicle->pEntity ->IsSpecialFeatureEnabled (WATER_CANNON) && !vehicle->pEntity ->IsSpecialFeatureEnabled (TURRET))
103106 {
104- CVehicleSA::SetComponentRotation (vehicleInterface->m_aCarNodes [CarNodes:: MISC_A], eComponentRotationAxis::AXIS_X, vehicleInterface->m_fDoomHorizontalRotation , true );
105- CVehicleSA::SetComponentRotation (vehicleInterface->m_aCarNodes [CarNodes:: MISC_A], eComponentRotationAxis::AXIS_Z, vehicleInterface->m_fDoomVerticalRotation , false );
107+ CVehicleSA::SetComponentRotation (vehicleInterface->m_aCarNodes [MISC_A], eComponentRotationAxis::AXIS_X, vehicleInterface->m_fDoomHorizontalRotation , true );
108+ CVehicleSA::SetComponentRotation (vehicleInterface->m_aCarNodes [MISC_A], eComponentRotationAxis::AXIS_Z, vehicleInterface->m_fDoomVerticalRotation , false );
106109 }
107110
108111 // Turret like rhino or swat van
109- if (vehicle->pEntity ->IsSpecialFeatureEnabled (VehicleFeatures::Enum:: TURRET))
112+ if (vehicle->pEntity ->IsSpecialFeatureEnabled (TURRET))
110113 {
111- CVehicleSA::SetComponentRotation (vehicleInterface->m_aCarNodes [CarNodes:: MISC_A], eComponentRotationAxis::AXIS_Z, vehicleInterface->m_fDoomVerticalRotation , true );
112- CVehicleSA::SetComponentRotation (vehicleInterface->m_aCarNodes [CarNodes:: MISC_B], eComponentRotationAxis::AXIS_X, vehicleInterface->m_fDoomHorizontalRotation , true );
114+ CVehicleSA::SetComponentRotation (vehicleInterface->m_aCarNodes [MISC_A], eComponentRotationAxis::AXIS_Z, vehicleInterface->m_fDoomVerticalRotation , true );
115+ CVehicleSA::SetComponentRotation (vehicleInterface->m_aCarNodes [MISC_B], eComponentRotationAxis::AXIS_X, vehicleInterface->m_fDoomHorizontalRotation , true );
113116 }
114117}
115118
@@ -124,12 +127,11 @@ bool CAutomobileSA::HasFeatureEnabled(CAutomobileSAInterface* vehicleInterface,
124127
125128static constexpr std::uintptr_t SKIIP_FIRE_TRUCK = 0x6B1F77 ;
126129static constexpr std::uintptr_t CONTINUE_FIRE_TRUCK = 0x6B1F5B ;
127- static constexpr VehicleFeatures::Enum WATER_CANNON_ID = VehicleFeatures::Enum::WATER_CANNON;
128130static void _declspec (naked) HOOK_CAutomobile_ProcessControl_FireTruckCheck()
129131{
130132 _asm
131133 {
132- push WATER_CANNON_ID
134+ push WATER_CANNON
133135 push esi
134136 call CAutomobileSA::HasFeatureEnabled
135137 add esp, 8
0 commit comments