16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 17:09:19 +02:00

Exterior model external_only submodel to hide when player is inside cab

This commit is contained in:
2025-03-02 19:49:32 +01:00
parent 010663e021
commit 13e6dc0f87
2 changed files with 7 additions and 1 deletions

View File

@@ -1164,6 +1164,9 @@ void TDynamicObject::ABuLittleUpdate(double ObjSqrDist)
btnOn = true; btnOn = true;
} }
// only external models ( external_only_on / external_only_off )
btExteriorOnly.Turn(!bDisplayCab); // display only when cab is not rendered
if( ( false == bDisplayCab ) // edge case, lowpoly may act as a stand-in for the hi-fi cab, so make sure not to show the driver when inside if( ( false == bDisplayCab ) // edge case, lowpoly may act as a stand-in for the hi-fi cab, so make sure not to show the driver when inside
&& ( Mechanik != nullptr ) && ( Mechanik != nullptr )
&& ( ( Mechanik->action() != TAction::actSleep ) && ( ( Mechanik->action() != TAction::actSleep )
@@ -2373,9 +2376,11 @@ TDynamicObject::Init(std::string Name, // nazwa pojazdu, np. "EU07-424"
iInventory[end::rear] |= m_highbeam22.Active() ? light::highbeamlight_right : 0; iInventory[end::rear] |= m_highbeam22.Active() ? light::highbeamlight_right : 0;
iInventory[end::rear] |= m_highbeam23.Active() ? light::highbeamlight_left : 0; iInventory[end::rear] |= m_highbeam23.Active() ? light::highbeamlight_left : 0;
btExteriorOnly.Init("external_only", mdModel, false);
btMechanik1.Init( "mechanik1", mdLowPolyInt, false); btMechanik1.Init( "mechanik1", mdLowPolyInt, false);
btMechanik2.Init( "mechanik2", mdLowPolyInt, false); btMechanik2.Init( "mechanik2", mdLowPolyInt, false);
if( MoverParameters->dizel_heat.water.config.shutters ) { if( MoverParameters->dizel_heat.water.config.shutters ) {
btShutters1.Init( "shutters1", mdModel, false ); btShutters1.Init( "shutters1", mdModel, false );
} }

View File

@@ -494,6 +494,7 @@ private:
AirCoupler m_headsignal13; AirCoupler m_headsignal13;
AirCoupler m_headsignal22; AirCoupler m_headsignal22;
AirCoupler m_headsignal23; AirCoupler m_headsignal23;
TButton btExteriorOnly;
TButton btMechanik1; TButton btMechanik1;
TButton btMechanik2; TButton btMechanik2;
TButton btShutters1; // cooling shutters for primary water circuit TButton btShutters1; // cooling shutters for primary water circuit