mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-03 08:55:22 +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:
@@ -256,6 +256,9 @@ void state_manager::process_commands() {
|
||||
if (commanddata.command == user_command::debugtoggle)
|
||||
DebugModeFlag = !DebugModeFlag;
|
||||
|
||||
if (commanddata.command == user_command::flashlighttoggle)
|
||||
Global.flashlight = !Global.flashlight;
|
||||
|
||||
if (commanddata.command == user_command::pausetoggle) {
|
||||
if( Global.iPause & 1 ) {
|
||||
// jeśli pauza startowa
|
||||
|
||||
Reference in New Issue
Block a user