16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 06:59:18 +02:00

build 200608. model texture change event, whois event enhancement, optional track friction modifier, three state headlight visualization, three state coupler visualizaion, vehicle light activation fix

This commit is contained in:
tmj-fstate
2020-06-08 16:13:18 +02:00
parent 03561b11d8
commit 8bb5554b20
14 changed files with 450 additions and 183 deletions

View File

@@ -42,7 +42,34 @@ class TAirCoupler
bxOn = true;
Update();
};
// inline bool Active() { if ((pModelOn)||(pModelOff)) return true; return false;};
// if the xOn model is missing, activate plain On instead
inline void TurnxOnWithOnAsFallback()
{
if( pModelxOn != nullptr ) {
bOn = false;
bxOn = true;
Update();
}
else {
TurnOn();
}
};
// if the xOn model is missing, activate plain Off instead
inline void TurnxOnWithOffAsFallback()
{
if( pModelxOn != nullptr ) {
bOn = false;
bxOn = true;
Update();
}
else {
TurnOff();
}
};
inline bool Active() const
{
return ( ( pModelOn != nullptr ) || ( pModelxOn != nullptr ) );
};
int GetStatus();
void Init(std::string const &asName, TModel3d *pModel);
void Load(cParser *Parser, TModel3d *pModel);