18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-03 06:35:21 +01:00

feat(driver): a flashlight of the player, switched with Ctrl+Shift+L

The new command flashlighttoggle (Ctrl+Shift+L, free in the default keyboard bindings) switches a cone
of warm white light from a little under the camera where it looks, in the cab, outside and in the free
camera, by day as well. It is one more local light of the clustered lighting (gfx::local_lights), so it
works with both the OpenGL 4.6 and the Vulkan renderers, and only with gfx.lights.clustered on. It
casts no shadows. It is off at the start and isn't kept between the runs.

The command is added at the end of user_command, so the numbers of the commands before it stay as they
were. Its key comes from the default bindings in the code: an eu07_input-keyboard.ini without it keeps
working, and one can bind it to another key with a "flashlighttoggle" line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
miloszunio
2026-11-24 00:11:50 +01:00
parent 51c76da927
commit d11555e46e
7 changed files with 40 additions and 0 deletions
+1
View File
@@ -263,6 +263,7 @@ driverkeyboard_input::default_bindings() {
// interiorlightenable,
// interiorlightdisable,
{ interiorlightdimtoggle, {GLFW_KEY_APOSTROPHE | keymodifier::control, ""} },
{ flashlighttoggle, {GLFW_KEY_L | keymodifier::control | keymodifier::shift, ""} },
// interiorlightdimenable,
// interiorlightdimdisable,
// compartmentlightstoggle,