mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
Add command to set lights on occupied vehicle
This commit is contained in:
@@ -294,6 +294,8 @@ TTrain::commandhandler_map const TTrain::m_commandhandlers = {
|
||||
{user_command::wiperswitchincrease, &TTrain::OnCommand_wiperswitchincrease},
|
||||
{user_command::wiperswitchdecrease, &TTrain::OnCommand_wiperswitchdecrease},
|
||||
|
||||
{user_command::lightsset, &TTrain::OnCommand_lightsset},
|
||||
|
||||
{ user_command::pantographlowerall, &TTrain::OnCommand_pantographlowerall },
|
||||
{ user_command::pantographselectnext, &TTrain::OnCommand_pantographselectnext },
|
||||
{ user_command::pantographselectprevious, &TTrain::OnCommand_pantographselectprevious },
|
||||
@@ -4402,6 +4404,12 @@ void TTrain::OnCommand_headlighttoggleleft( TTrain *Train, command_data const &C
|
||||
}
|
||||
}
|
||||
|
||||
void TTrain::OnCommand_lightsset(TTrain *Train, command_data const &Command)
|
||||
{
|
||||
Train->mvOccupied->iLights[end::front] = Command.param1;
|
||||
Train->mvOccupied->iLights[end::rear] = Command.param2;
|
||||
}
|
||||
|
||||
void TTrain::OnCommand_headlightenableleft( TTrain *Train, command_data const &Command ) {
|
||||
|
||||
if( Train->mvOccupied->LightsPosNo > 0 ) {
|
||||
|
||||
Reference in New Issue
Block a user