mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-19 12:19:18 +02:00
stars object, interrior lighting level as accessible parameter for dynamic object
This commit is contained in:
34
Train.cpp
34
Train.cpp
@@ -5001,6 +5001,40 @@ bool TTrain::Update( double const Deltatime )
|
||||
btHaslerBrakes.Turn(DynamicObject->MoverParameters->BrakePress > 0.4); // ciśnienie w cylindrach
|
||||
btHaslerCurrent.Turn(DynamicObject->MoverParameters->Im != 0.0); // prąd na silnikach
|
||||
|
||||
// calculate current level of interior illumination
|
||||
// TODO: organize it along with rest of train update in a more sensible arrangement
|
||||
switch( iCabLightFlag ) // Ra: uzeleżnic od napięcia w obwodzie sterowania
|
||||
{ // hunter-091012: uzaleznienie jasnosci od przetwornicy
|
||||
case 0: {
|
||||
//światło wewnętrzne zgaszone
|
||||
DynamicObject->InteriorLightLevel = 0.0f;
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
//światło wewnętrzne przygaszone (255 216 176)
|
||||
if( mvOccupied->ConverterFlag == true ) {
|
||||
// jasnosc dla zalaczonej przetwornicy
|
||||
DynamicObject->InteriorLightLevel = 0.75f;
|
||||
}
|
||||
else {
|
||||
DynamicObject->InteriorLightLevel = 0.375f;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
//światło wewnętrzne zapalone (255 216 176)
|
||||
if( mvOccupied->ConverterFlag ==
|
||||
true ) // jasnosc dla zalaczonej przetwornicy
|
||||
{
|
||||
DynamicObject->InteriorLightLevel = 1.0f;
|
||||
}
|
||||
else {
|
||||
DynamicObject->InteriorLightLevel = 0.5f;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_updated = true;
|
||||
return true; //(DynamicObject->Update(dt));
|
||||
} // koniec update
|
||||
|
||||
Reference in New Issue
Block a user