@@ -1628,10 +1628,12 @@ void CPacketHandler::Packet_VehicleDamageSync(NetBitStreamInterface& bitStream)
1628
1628
CDeathmatchVehicle* pVehicle = static_cast <CDeathmatchVehicle*>(g_pClientGame->m_pVehicleManager ->Get (ID));
1629
1629
if (pVehicle)
1630
1630
{
1631
+ bool flyingComponents = g_pClientGame->IsWorldSpecialProperty (WorldSpecialProperty::FLYINGCOMPONENTS);
1632
+
1631
1633
for (unsigned int i = 0 ; i < MAX_DOORS; ++i)
1632
1634
{
1633
1635
if (damage.data .bDoorStatesChanged [i])
1634
- pVehicle->SetDoorStatus (i, damage.data .ucDoorStates [i], true );
1636
+ pVehicle->SetDoorStatus (i, damage.data .ucDoorStates [i], flyingComponents );
1635
1637
}
1636
1638
for (unsigned int i = 0 ; i < MAX_WHEELS; ++i)
1637
1639
{
@@ -1641,7 +1643,7 @@ void CPacketHandler::Packet_VehicleDamageSync(NetBitStreamInterface& bitStream)
1641
1643
for (unsigned int i = 0 ; i < MAX_PANELS; ++i)
1642
1644
{
1643
1645
if (damage.data .bPanelStatesChanged [i])
1644
- pVehicle->SetPanelStatus (i, damage.data .ucPanelStates [i]);
1646
+ pVehicle->SetPanelStatus (i, damage.data .ucPanelStates [i], flyingComponents );
1645
1647
}
1646
1648
for (unsigned int i = 0 ; i < MAX_LIGHTS; ++i)
1647
1649
{
@@ -2398,6 +2400,7 @@ void CPacketHandler::Packet_MapInfo(NetBitStreamInterface& bitStream)
2398
2400
g_pClientGame->SetWorldSpecialProperty (WorldSpecialProperty::EXTENDEDWATERCANNONS, wsProps.data4 .extendedwatercannons );
2399
2401
g_pClientGame->SetWorldSpecialProperty (WorldSpecialProperty::TUNNELWEATHERBLEND, wsProps.data5 .tunnelweatherblend );
2400
2402
g_pClientGame->SetWorldSpecialProperty (WorldSpecialProperty::IGNOREFIRESTATE, wsProps.data6 .ignoreFireState );
2403
+ g_pClientGame->SetWorldSpecialProperty (WorldSpecialProperty::FLYINGCOMPONENTS, wsProps.data7 .flyingcomponents );
2401
2404
2402
2405
float fJetpackMaxHeight = 100 ;
2403
2406
if (!bitStream.Read (fJetpackMaxHeight ))
@@ -3391,13 +3394,14 @@ void CPacketHandler::Packet_EntityAdd(NetBitStreamInterface& bitStream)
3391
3394
pVehicle->SetPaintjob (paintjob.data .ucPaintjob );
3392
3395
pVehicle->SetColor (vehColor);
3393
3396
3397
+ bool flyingComponents = g_pClientGame->IsWorldSpecialProperty (WorldSpecialProperty::FLYINGCOMPONENTS);
3394
3398
// Setup our damage model
3395
3399
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 );
3397
3401
for (int i = 0 ; i < MAX_WHEELS; i++)
3398
3402
pVehicle->SetWheelStatus (i, damage.data .ucWheelStates [i]);
3399
3403
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 );
3401
3405
for (int i = 0 ; i < MAX_LIGHTS; i++)
3402
3406
pVehicle->SetLightStatus (i, damage.data .ucLightStates [i]);
3403
3407
pVehicle->ResetDamageModelSync ();
0 commit comments