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

application component state switches, chromatic aberration post process filter, minor ai logic tweaks, minor cab controls tweaks, minor bug fixes

This commit is contained in:
tmj-fstate
2020-03-01 03:16:12 +01:00
parent 642b8fb623
commit 09ad3dbacd
13 changed files with 254 additions and 200 deletions

View File

@@ -2194,7 +2194,7 @@ TDynamicObject::init_sections( TModel3d const *Model, std::string const &Namepre
if( sectionsubmodel != nullptr ) {
// HACK: disable automatic self-illumination threshold, at least until 3d model update
if( Overrideselfillum ) {
sectionsubmodel->SetSelfIllum( 2.0f, true, true );
sectionsubmodel->SetSelfIllum( 2.0f, true, false );
}
Sections.push_back( {
sectionsubmodel,
@@ -2615,7 +2615,7 @@ TDynamicObject::update_load_sections() {
SectionLoadVisibility.push_back( { section.load, false } );
// HACK: disable automatic self-illumination threshold, at least until 3d model update
if( MoverParameters->CompartmentLights.start_type == start_t::manual ) {
section.load->SetSelfIllum( 2.0f, true, true );
section.load->SetSelfIllum( 2.0f, true, false );
}
}
}
@@ -3696,9 +3696,9 @@ bool TDynamicObject::Update(double dt, double dt1)
// compartment lights
// if the vehicle has a controller, we base the light state on state of the controller otherwise we check the vehicle itself
if( ( ctOwner != nullptr ?
ctOwner->Controlling()->Battery != SectionLightsActive :
MoverParameters->CompartmentLights.is_active == true ) ) { // without controller lights are off. NOTE: this likely mess up the EMU
if( ( ctOwner != nullptr ? ctOwner->Controlling()->Battery != SectionLightsActive :
Mechanik != nullptr ? Mechanik->primary() == false : // don't touch lights in a stand-alone manned vehicle
MoverParameters->CompartmentLights.is_active == true ) ) { // without controller switch the lights off
toggle_lights();
}