mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 22:59:19 +02:00
build 200501. minor bug fixes
This commit is contained in:
@@ -537,9 +537,6 @@ bool TMoverParameters::DirectionForward()
|
|||||||
{
|
{
|
||||||
++DirActive;
|
++DirActive;
|
||||||
DirAbsolute = DirActive * CabActive;
|
DirAbsolute = DirActive * CabActive;
|
||||||
if (DirAbsolute)
|
|
||||||
if (Power24vIsAvailable) // jeśli bateria jest już załączona
|
|
||||||
BatterySwitch(true); // to w ten oto durny sposób aktywuje się CA/SHP
|
|
||||||
SendCtrlToNext("Direction", DirActive, CabActive);
|
SendCtrlToNext("Direction", DirActive, CabActive);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -3023,6 +3020,7 @@ bool TMoverParameters::DirectionBackward(void)
|
|||||||
--CabActive;
|
--CabActive;
|
||||||
// else
|
// else
|
||||||
--DirActive;
|
--DirActive;
|
||||||
|
DirAbsolute = DirActive * CabActive;
|
||||||
SendCtrlToNext("Direction", DirActive, CabActive);
|
SendCtrlToNext("Direction", DirActive, CabActive);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
22
Train.cpp
22
Train.cpp
@@ -498,16 +498,13 @@ bool TTrain::Init(TDynamicObject *NewDynamicObject, bool e3d)
|
|||||||
|
|
||||||
{
|
{
|
||||||
Global.CurrentMaxTextureSize = Global.iMaxCabTextureSize;
|
Global.CurrentMaxTextureSize = Global.iMaxCabTextureSize;
|
||||||
|
|
||||||
auto const filename{ DynamicObject->asBaseDir + DynamicObject->MoverParameters->TypeName + ".mmd" };
|
auto const filename{ DynamicObject->asBaseDir + DynamicObject->MoverParameters->TypeName + ".mmd" };
|
||||||
auto const result { LoadMMediaFile( filename ) };
|
LoadMMediaFile( filename );
|
||||||
Global.CurrentMaxTextureSize = Global.iMaxTextureSize;
|
|
||||||
/*
|
|
||||||
if( false == result ) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
InitializeCab( mvOccupied->CabOccupied, filename );
|
InitializeCab( mvOccupied->CabOccupied, filename );
|
||||||
|
|
||||||
|
Global.CurrentMaxTextureSize = Global.iMaxTextureSize;
|
||||||
|
|
||||||
if( DynamicObject->Controller == Humandriver ) {
|
if( DynamicObject->Controller == Humandriver ) {
|
||||||
// McZapkie-030303: mozliwosc wyswietlania kabiny, w przyszlosci dac opcje w mmd
|
// McZapkie-030303: mozliwosc wyswietlania kabiny, w przyszlosci dac opcje w mmd
|
||||||
DynamicObject->bDisplayCab = true;
|
DynamicObject->bDisplayCab = true;
|
||||||
@@ -3012,8 +3009,15 @@ void TTrain::OnCommand_convertertoggle( TTrain *Train, command_data const &Comma
|
|||||||
|
|
||||||
if( Command.action == GLFW_PRESS ) {
|
if( Command.action == GLFW_PRESS ) {
|
||||||
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
// only reacting to press, so the switch doesn't flip back and forth if key is held down
|
||||||
if( ( false == Train->mvOccupied->Power110vIsAvailable )
|
auto const overloadrelayisopen { (
|
||||||
&& ( Train->ggConverterButton.GetValue() < 0.5 ) ) {
|
Train->Dynamic()->Mechanik != nullptr ?
|
||||||
|
Train->Dynamic()->Mechanik->IsAnyConverterOverloadRelayOpen :
|
||||||
|
Train->mvOccupied->ConvOvldFlag ) };
|
||||||
|
|
||||||
|
if( Train->mvOccupied->ConvSwitchType != "impulse" ?
|
||||||
|
Train->ggConverterButton.GetValue() < 0.5 :
|
||||||
|
( ( false == Train->mvOccupied->Power110vIsAvailable )
|
||||||
|
&& ( false == overloadrelayisopen ) ) ) {
|
||||||
// turn on
|
// turn on
|
||||||
OnCommand_converterenable( Train, Command );
|
OnCommand_converterenable( Train, Command );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user