mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 10:59:20 +02:00
Add -editor startup so the exe comes up straight in the editor
The editor was reachable only from the driver mode with F11, which meant loading a scenario and starting the whole simulation first. With -editor the scenario loader hands over to the editor instead of the driver, so physics, AI and timetables never run - only the loaded world is there to be worked on. Without -s the scenery from eu07.ini is used, falling back to pusta.scn when the ini names none. F11 quits instead of popping the mode, since the editor is now the bottom of the mode stack and popping it would leave the rest of the frame reading an empty one. Editor entry forces free-fly even with no vehicle to leave.
This commit is contained in:
@@ -1362,8 +1362,11 @@ void editor_mode::enter()
|
||||
Camera.m_owner = nullptr;
|
||||
Camera.LookAt = vehicle->GetPosition();
|
||||
Camera.RaLook(); // single camera reposition
|
||||
FreeFlyModeFlag = true;
|
||||
}
|
||||
// edytor pracuje wyłącznie kamerą swobodną. Przy starcie prosto do edytora nie ma pojazdu, z
|
||||
// którego można by wysiąść, a flagę i tak trzeba podnieść - inaczej kamera zostaje w trybie
|
||||
// kabinowym, nie mając kabiny
|
||||
FreeFlyModeFlag = true;
|
||||
}
|
||||
|
||||
Global.ControlPicking = true;
|
||||
@@ -1455,7 +1458,12 @@ void editor_mode::on_key(int const Key, int const Scancode, int const Action, in
|
||||
|
||||
if (!Global.ctrlState && !Global.shiftState)
|
||||
{
|
||||
Application.pop_mode();
|
||||
// przy starcie do edytora nie ma trybu, do którego można wrócić - zdjęcie ostatniego trybu
|
||||
// zostawiłoby pusty stos, z którego reszta klatki nadal by czytała
|
||||
if (Global.editor_startup)
|
||||
Application.queue_quit(true);
|
||||
else
|
||||
Application.pop_mode();
|
||||
}
|
||||
else if (Global.ctrlState && Global.shiftState)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user