@@ -1628,10 +1628,12 @@ void CPacketHandler::Packet_VehicleDamageSync(NetBitStreamInterface& bitStream)
16281628 CDeathmatchVehicle* pVehicle = static_cast <CDeathmatchVehicle*>(g_pClientGame->m_pVehicleManager ->Get (ID));
16291629 if (pVehicle)
16301630 {
1631+ bool flyingComponents = g_pClientGame->IsWorldSpecialProperty (WorldSpecialProperty::FLYINGCOMPONENTS);
1632+
16311633 for (unsigned int i = 0 ; i < MAX_DOORS; ++i)
16321634 {
16331635 if (damage.data .bDoorStatesChanged [i])
1634- pVehicle->SetDoorStatus (i, damage.data .ucDoorStates [i], true );
1636+ pVehicle->SetDoorStatus (i, damage.data .ucDoorStates [i], flyingComponents );
16351637 }
16361638 for (unsigned int i = 0 ; i < MAX_WHEELS; ++i)
16371639 {
@@ -1641,7 +1643,7 @@ void CPacketHandler::Packet_VehicleDamageSync(NetBitStreamInterface& bitStream)
16411643 for (unsigned int i = 0 ; i < MAX_PANELS; ++i)
16421644 {
16431645 if (damage.data .bPanelStatesChanged [i])
1644- pVehicle->SetPanelStatus (i, damage.data .ucPanelStates [i]);
1646+ pVehicle->SetPanelStatus (i, damage.data .ucPanelStates [i], flyingComponents );
16451647 }
16461648 for (unsigned int i = 0 ; i < MAX_LIGHTS; ++i)
16471649 {
@@ -2398,6 +2400,7 @@ void CPacketHandler::Packet_MapInfo(NetBitStreamInterface& bitStream)
23982400 g_pClientGame->SetWorldSpecialProperty (WorldSpecialProperty::EXTENDEDWATERCANNONS, wsProps.data4 .extendedwatercannons );
23992401 g_pClientGame->SetWorldSpecialProperty (WorldSpecialProperty::TUNNELWEATHERBLEND, wsProps.data5 .tunnelweatherblend );
24002402 g_pClientGame->SetWorldSpecialProperty (WorldSpecialProperty::IGNOREFIRESTATE, wsProps.data6 .ignoreFireState );
2403+ g_pClientGame->SetWorldSpecialProperty (WorldSpecialProperty::FLYINGCOMPONENTS, wsProps.data7 .flyingcomponents );
24012404
24022405 float fJetpackMaxHeight = 100 ;
24032406 if (!bitStream.Read (fJetpackMaxHeight ))
@@ -3391,13 +3394,14 @@ void CPacketHandler::Packet_EntityAdd(NetBitStreamInterface& bitStream)
33913394 pVehicle->SetPaintjob (paintjob.data .ucPaintjob );
33923395 pVehicle->SetColor (vehColor);
33933396
3397+ bool flyingComponents = g_pClientGame->IsWorldSpecialProperty (WorldSpecialProperty::FLYINGCOMPONENTS);
33943398 // Setup our damage model
33953399 for (int i = 0 ; i < MAX_DOORS; i++)
3396- pVehicle->SetDoorStatus (i, damage.data .ucDoorStates [i], true );
3400+ pVehicle->SetDoorStatus (i, damage.data .ucDoorStates [i], flyingComponents );
33973401 for (int i = 0 ; i < MAX_WHEELS; i++)
33983402 pVehicle->SetWheelStatus (i, damage.data .ucWheelStates [i]);
33993403 for (int i = 0 ; i < MAX_PANELS; i++)
3400- pVehicle->SetPanelStatus (i, damage.data .ucPanelStates [i]);
3404+ pVehicle->SetPanelStatus (i, damage.data .ucPanelStates [i], flyingComponents );
34013405 for (int i = 0 ; i < MAX_LIGHTS; i++)
34023406 pVehicle->SetLightStatus (i, damage.data .ucLightStates [i]);
34033407 pVehicle->ResetDamageModelSync ();
0 commit comments