17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-05 20:39:09 +01:00

fix(ai): release horn when human driver takes over from AI

This commit is contained in:
jerrrrycho
2026-10-16 13:10:50 +02:00
parent 05ffb9058c
commit ccb973e049
24 changed files with 8090 additions and 83 deletions

View File

@@ -195,6 +195,9 @@ class TTrain {
bool initialize_button(cParser &Parser, std::string const &Label, int const Cabindex);
// helper, returns true for EMU with oerlikon brake
bool is_eztoer() const;
// helper, returns true if both horn tones are operated with the same lever, without separate low and high tone buttons
bool has_single_horn_lever() const {
return ggHornButton.SubModel != nullptr && ggHornLowButton.SubModel == nullptr && ggHornHighButton.SubModel == nullptr; }
// locates nearest vehicle belonging to the consist
TDynamicObject *find_nearest_consist_vehicle(bool freefly, glm::vec3 pos) const;
// mover master controller to specified position