16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-17 22:39:17 +02:00

3032 Commits

Author SHA1 Message Date
jakubg1
8a94bfbfa2 Fix a segfault when closing on Wayland
According to https://github.com/glfw/glfw/issues/2744, this will be fixed in GLFW 3.5.
2026-04-14 15:08:44 +02:00
bcf3d2fdd8 Merge pull request #88 from jakubg1/dev
Simplify internal derailing logic, improve warning signals before closing doors in certain EMUs
26.05
2026-04-09 09:05:48 +02:00
jakubg1
68c02cb3b1 Merge branch 'MaSzyna-EU07:master' into dev 2026-04-09 02:52:22 +02:00
jakubg1
0d010e8c6a Simplify derailing logic, derail reason enum
- The `TMoverParameters::derail()` function has been renamed to `::Derail()`, with a capital D.
- All derail events now use that function.
  - Simplified and unified the logic behind different derail types.
  - The `dtrack_freerail` track type is now slightly increasing the chance of derailing on a tight curve, as it was the intention.
- A new `DerailReason` enum has been created which holds all derail types.
- The `DerailReason` field in the `TMoverParameters` class has been removed.
  - This was a transient field which is not necessary anymore.
  - The logging functionality as such has been moved from `DynObj.cpp` to `Mover.cpp`.
2026-04-04 02:05:49 +02:00
jakubg1
407b187688 Tweak the door closing and warning signal delays
- The warning signal is no longer going to be played for an obnoxiously long amount of time by AI drivers when driving vehicles with a manual warning signal switch, most notably EN57.
  - A new `moveDepartureWarned` driving flag has been created to accomodate this behavior.
- Added the action time counter and the missing driving flags to the Vehicle AI section.
2026-04-04 00:13:26 +02:00
xingzihai
754fc50ca8 feat: add EngineMaxTemperature support for diesel locomotive overheat detection
Add engine temperature monitoring to diesel locomotive heat management system:
- Add engine field to heat_data struct (fluid_circuit_t type)
- Add EngineMaxTemperature config extraction in .fiz files
- Add engine overheat detection logic (is_hot check)
- Include engine.is_hot in PT status check

Implements issue #77: Oil, water and engine overheat lamps for diesel locomotives
2026-04-01 23:28:28 +00:00
Agent
68fa78a582 feat(overheat): Add overheat indicator lamps for oil, water, water_aux, and engine
- Add engine_max_temp and engine_is_hot fields to heat_data structure
- Add EngineMaxTemperature field extraction from .fiz files
- Add engine overheat check comparing Ts with engine_max_temp
- Add four new overheat lamp indicators:
  - i-oil_overheat
  - i-water_overheat
  - i-wateraux_overheat
  - i-engine_overheat
- Add lamp update logic to turn on/off based on is_hot flags
- Add lamp initialization in clear_cab_controls()

This implements issue #77 - overheat lamps for diesel engines.

The lamps will turn on when:
- Oil temperature exceeds OilMaxTemperature
- Water temperature exceeds WaterMaxTemperature
- Auxiliary water temperature exceeds WaterAuxMaxTemperature
- Engine temperature exceeds EngineMaxTemperature

Each check includes 8-degree hysteresis to prevent rapid on/off cycling.
2026-04-01 23:26:39 +00:00
203b2727af Update custom license link in README.md eu07-2026.220-prerelease 2026-04-01 20:17:33 +02:00
79f3991e13 Update README with new header and links 2026-04-01 20:15:47 +02:00
3ff4fbe88f Add readme header 2026-04-01 20:10:33 +02:00
jakubg1
b4fdb9ce73 Merge branch 'MaSzyna-EU07:master' into lua-refactor 2026-04-01 17:32:29 +02:00
jakubg1
8315e4cf81 Merge pull request #60 from jakubg1/dev
Improve the light blinking algorithm
2026-04-01 17:12:33 +02:00
jakubg1
d13c27a7eb Improve the light blinking algorithm
- Fixed phase shift when the light is specified as a negative value.
  - This fixes railroad crossing lights!!!
- Improved light transition times to make them even more realistic.
- Simplified the overall code.
2026-04-01 16:09:44 +02:00
jakubg1
5d5264a8f3 Prefix error messages
When a Lua code fails to execute and throws an error, the log line now starts from `lua: Runtime error: `.
2026-04-01 16:06:17 +02:00
jakubg1
3a600334a7 Add an index parameter to lua::get_memcell_values()
We could have done away with it just because the memcell values are always the last parameter. However, this might not always be the case in the future. Also, it's better for consistency reasons.
2026-04-01 02:43:25 +02:00
jakubg1
2a9343149f Fix Lua memcell API
- Fixed the `api.memcell_update` and `api.memcell_update_n` functions to accept the `memcell_values` structure instead of three separate values.
  - Additionally, also fixed the error message for when the memcell is not found.
2026-04-01 02:37:58 +02:00
jakubg1
686cab8184 Fix a segfault when calling api.dynobj_putvalues()
An undocumented change from the previous commit:
- When the Lua script is not able to find an object, the message is now printed to `errors.txt`, not just to `log.txt`.
2026-04-01 02:13:30 +02:00
jakubg1
ca8e4aae71 Refactor Lua bindings to not use FFI anymore
- Lua bindings are no longer using FFI in favor of the "classic" Lua C API.
  - This makes it work properly on native Linux builds.
- Changed the Lua API slightly:
  - Removed the `api.event_preparefunc()` function because it is no longer necessary. Instead, you can pass any function you want without preparing it first.
  - Added an `api.event_exists()` function. Takes a single `name` argument.
  - Any `api.find_*()` functions return `nil` instead of an userdata representing a null pointer when the requested object is not found.
2026-04-01 01:42:54 +02:00
84f86e725c Merge pull request #59 from jerrrrycho/utilities-refactor-enhancements
refactor: change globals to namespace and split configparse
2026-03-15 16:25:13 +01:00
jerrrrycho
17e83f70a2 refactor: split configparse 2026-03-15 13:25:54 +01:00
jerrrrycho
9f43dca48b refactor: create paths namespace instead of global variables 2026-03-15 11:55:30 +01:00
383788b30a Document directory structure in directoryDescription.md
Added a detailed description of the directory structure and its components.
2026-03-15 01:36:17 +01:00
e2081e3322 Merge pull request #58 from MaSzyna-EU07/copilot/rebuild-files-structure
Simulator main directory file structure rebuilded
2026-03-15 01:34:29 +01:00
0715437108 Fix include directives 2026-03-14 20:51:11 +01:00
copilot-swe-agent[bot]
4b1913438d Fix #includes in betterRenderer and ci_shadervalidator after file reorganization
Co-authored-by: Hirek193 <23196899+Hirek193@users.noreply.github.com>
2026-03-14 19:26:52 +00:00
copilot-swe-agent[bot]
7e49aa8740 Rewrite #includes to use explicit subdirectory paths
Co-authored-by: Hirek193 <23196899+Hirek193@users.noreply.github.com>
2026-03-14 19:16:48 +00:00
copilot-swe-agent[bot]
0531086bb9 Reorganize source files into logical subdirectories
Co-authored-by: Hirek193 <23196899+Hirek193@users.noreply.github.com>
2026-03-14 19:01:57 +00:00
copilot-swe-agent[bot]
f981f81d55 Initial plan 2026-03-14 18:56:35 +00:00
c2dfc460f3 Add setup.sh script for linux builds 2026-02-25 08:30:20 +01:00
30c4a3c3b6 Merge pull request #56 from DaniuPl/master
Undo/Redo system, hierarchy for models in scene, uuid for basic_nodes, menu bar  'windows' options
2026-02-24 11:16:37 +01:00
23783892f0 Undo/Redo system, hierarchy for models in scene, uuid for basic_nodes, menu bar 'windows' options 2026-02-23 21:31:31 +01:00
01bcadff8c Merge pull request #52 from docentYT/code-optimization
Small code optimizations that results with 3x faster main loop
2026-02-08 13:06:00 +01:00
40bbbc6210 Add power smoothing for inverter based vehicles 2026-02-08 13:04:49 +01:00
Christopher Kwiatkowski
04155e3d16 Merge branch 'MaSzyna-EU07:master' into code-optimization 2026-02-07 19:53:36 +01:00
docentYT
ed2f172954 Use glClientWaitSync instead of glGetSynciv 2026-02-07 19:47:32 +01:00
docentYT
42ad3a27d0 Do not make context current if not needed 2026-02-07 19:34:38 +01:00
96af173fc1 Merge pull request #51 from jerrrrycho/python-renderer-memcpy
refactor: replace per-pixel Python renderer RGBA copying with memcpy
2026-02-07 19:06:13 +01:00
jerrrrycho
964a3de706 refactor: replace per-pixel Python renderer RGBA copying with memcpy 2026-02-07 17:33:29 +01:00
b7b74c2942 Merge pull request #50 from docentYT/code-optimization
Remove not needed buffer unbinds
2026-02-07 13:39:19 +01:00
docentYT
84277ed051 Remove not needed buffer unbinds. In OpenGl unbinding for every frame is not needed. 2026-02-06 23:32:48 +01:00
dac74e7cb1 Merge pull request #49 from docentYT/fix-better-renderer-not-compiling
Fix DXIL IMPORTED_LOCATION path
2026-02-06 19:13:36 +01:00
docentYT
771daa743c Fix DXIL IMPORTED_LOCATION path 2026-02-06 16:45:35 +01:00
1ab0be5982 Disable discord rpc running on non containing builds 2026-02-04 08:01:19 +01:00
ec86018570 Change default async train calculation to disabled 2026-02-04 07:46:39 +01:00
f6081c082f Merge pull request #48 from docentYT/code-optimizations
Optimize and simplify Camera.cpp
2026-02-04 07:28:35 +01:00
53561b84ab Merge pull request #47 from docentYT/update-vcpkg-version
Update vcpkg version
2026-02-04 07:27:58 +01:00
761684681b Merge pull request #46 from NishizakiHayato/master
Fix the Chinese display issue for the text below 'Did you know?' on the loading page
2026-02-04 07:26:47 +01:00
docentYT
c545da2c97 Make OnCursorMove simpler 2026-02-03 00:50:05 +01:00
docentYT
62b98abecd ComputeAxisSpeed for m_moverate.y 2026-02-03 00:41:31 +01:00
docentYT
3ecfbd33ea UpdateVelocityAxis static function 2026-02-03 00:14:12 +01:00