Commit Graph

1934 Commits

Author SHA1 Message Date
Jonathan G Rennison
3017cb63a9 Fix parameter shadowing in ApplyLookAheadItem 2023-03-09 17:33:19 +00:00
Jonathan G Rennison
277985ad9d Fix parameter shadowing in GetTrainStopLocation 2023-03-09 17:32:24 +00:00
Jonathan G Rennison
8dca681c8c Use btree_multimap for pending speed restrictions
Avoid unnecessary iteration when saving VESR chunk
2023-03-07 00:31:14 +00:00
Jonathan G Rennison
4ec6a99dd8 Add GetTileTrackStatus wrapper for when red signals part is not needed 2023-03-04 02:01:40 +00:00
Jonathan G Rennison
ae7c86c49d Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/release-linux.yml
#	.github/workflows/release-macos.yml
#	src/industry_cmd.cpp
#	src/industry_cmd.h
#	src/network/core/http_curl.cpp
#	src/network/core/tcp_http.cpp
#	src/network/core/tcp_http.h
#	src/network/network_content.h
#	src/script/api/script_goal.cpp
#	src/script/api/script_industry.cpp
#	src/script/api/script_league.cpp
#	src/script/api/script_story_page.cpp
#	src/script/api/script_town.cpp
#	src/train.h
#	src/train_cmd.cpp
2023-03-04 01:17:27 +00:00
SamuXarick
b52b29b1a4 Change: Avoid crashing to the side of a train
When a road vehicle is already running on a multi level crossing, and a train shows up ahead, don't make the road vehicle crash on the side of the train.
2023-02-22 20:09:02 +01:00
Jonathan G Rennison
f7d62a1767 Add road/tram type flag to disallow collisions with trains 2023-02-19 18:05:11 +00:00
Jonathan G Rennison
8d6e57799c Fix various possible integer type conversion issues 2023-02-15 23:05:03 +00:00
Jonathan G Rennison
483e3172af Merge branch 'master' into jgrpp
# Conflicts:
#	src/core/strong_typedef_type.hpp
#	src/gfx.cpp
#	src/group_cmd.cpp
#	src/industry_cmd.cpp
#	src/map_func.h
#	src/newgrf_debug_gui.cpp
#	src/order_cmd.cpp
#	src/pathfinder/follow_track.hpp
#	src/rail_cmd.cpp
#	src/road_cmd.cpp
#	src/road_gui.cpp
#	src/saveload/saveload.cpp
#	src/screenshot.cpp
#	src/smallmap_gui.cpp
#	src/station_cmd.cpp
#	src/strings.cpp
#	src/tile_type.h
#	src/timetable_gui.cpp
#	src/town_cmd.cpp
#	src/train_cmd.cpp
#	src/viewport.cpp
2023-02-10 17:19:35 +00:00
rubidium42
6ba55e663e Codechange: do not hide variables with other variables 2023-01-29 07:21:34 +01:00
Rubidium
fe2bcd2a58 Codechange: migrate size related functions to Map structure 2023-01-21 17:11:40 +01:00
Jonathan G Rennison
0310fb0cdc Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/czech.txt
#	src/lang/galician.txt
#	src/lang/german.txt
#	src/order_cmd.cpp
#	src/saveload/afterload.cpp
#	src/ship.h
#	src/vehicle.cpp
2023-01-05 23:45:34 +00:00
Rubidium
375a5b8e3f Codechange: refactor FindClosestDepot to not use pointers, but return a struct 2023-01-04 22:30:48 +01:00
Jonathan G Rennison
58d841486e Merge branch 'master' into jgrpp
# Conflicts:
#	src/os/windows/font_win32.cpp
#	src/script/api/script_object.hpp
#	src/town_cmd.cpp
#	src/train_cmd.cpp
#	src/viewport.cpp
#	src/viewport_func.h
2022-12-27 01:00:40 +00:00
PeterN
7b5edba76c Change: Support flipping shorter engines without NewGRF support. (#10262)
* Change: Support flipping shorter engines without NewGRF support.
* Cleanup: Remove write-only prop27_set temporary flag.
2022-12-23 21:02:14 +00:00
Jonathan G Rennison
6d4474b84e Merge tag '13.0-beta2' into jgrpp
# Conflicts:
#	src/cheat_gui.cpp
#	src/company_gui.cpp
#	src/console_gui.cpp
#	src/depot_gui.cpp
#	src/error_gui.cpp
#	src/gfx.cpp
#	src/graph_gui.cpp
#	src/group_gui.cpp
#	src/lang/english.txt
#	src/lang/korean.txt
#	src/lang/polish.txt
#	src/misc_gui.cpp
#	src/network/network_content_gui.h
#	src/newgrf_debug_gui.cpp
#	src/order_gui.cpp
#	src/rail_gui.cpp
#	src/road_gui.cpp
#	src/settings_gui.cpp
#	src/settings_type.h
#	src/station_gui.cpp
#	src/subsidy_gui.cpp
#	src/table/settings/gui_settings.ini
#	src/timetable_gui.cpp
#	src/town_gui.cpp
#	src/train_cmd.cpp
#	src/vehicle_gui.cpp
#	src/viewport.cpp
#	src/water_cmd.cpp
#	src/widgets/dropdown.cpp
#	src/window_gui.h
2022-12-04 20:43:11 +00:00
Jonathan G Rennison
5bbf1f5375 Merge branch 'master' into jgrpp
# Conflicts:
#	src/core/geometry_type.hpp
#	src/error_gui.cpp
#	src/rail_gui.cpp
#	src/tree_gui.cpp
#	src/vehicle_gui.cpp
#	src/widgets/dropdown.cpp
2022-12-03 23:40:37 +00:00
Jonathan G Rennison
1f36c3f3e4 Merge branch 'master' into jgrpp
# Conflicts:
#	src/ai/ai_gui.cpp
#	src/build_vehicle_gui.cpp
#	src/genworld_gui.cpp
#	src/lang/english.txt
#	src/lang/german.txt
#	src/lang/korean.txt
#	src/newgrf_sound.cpp
#	src/roadveh.h
#	src/sound.cpp
#	src/station_cmd.cpp
#	src/train.h
#	src/train_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehicle_gui.cpp
2022-11-26 23:04:14 +00:00
Peter Nelson
f5f035a22b Codechange: Make use of Rect Width/Height helpers. 2022-11-12 18:28:39 +00:00
Peter Nelson
ed60c88b0a Change: Use power-of-2 scaling for some dimensions in GUI.
These are related to drawing sprites that are normally drawn on the
landscape, and should therefore still follow power-of-2 scaling to fit
correctly.
2022-11-12 18:28:39 +00:00
Artin Alavi
fd4f148c62 Feature: Hotkey to honk a vehicle's horn (#10110) 2022-11-10 21:36:18 +01:00
Henry Wilson
59dbcdb5ba Feature: Display power-to-weight ratio in ground vehicle details GUI 2022-11-08 21:02:08 +01:00
Jonathan G Rennison
1518c2fa1e Merge branch 'master' into jgrpp
# Conflicts:
#	src/depot_type.h
#	src/lang/german.txt
#	src/order_gui.cpp
#	src/pathfinder/yapf/yapf_rail.cpp
#	src/script/api/script_window.hpp.in
#	src/settings_table.cpp
#	src/train_cmd.cpp
2022-11-05 17:19:00 +00:00
Jonathan G Rennison
4b08874583 Only show edge level crossing overlays even when safer crossings is off 2022-11-03 00:57:47 +00:00
Tyler Trahan
c19abebf8d Feature: Multi-track level crossings (#9931) 2022-11-01 16:51:23 -04:00
Jonathan G Rennison
0f697c5501 CheckNextTrainTile should never take action for OT_WAITING orders 2022-10-30 14:11:03 +00:00
Nicolas Chappe
721d98a7d0 Feature: Constantly update destination of 'any depot' orders 2022-10-22 14:19:08 +02:00
Nicolas Chappe
a4052ca348 Codechange: Add VehicleOrderSaver::Restore() 2022-10-22 14:19:08 +02:00
Nicolas Chappe
7e7d943526 Codechange: [YAPF] Allow to retrieve the final tile of the calculated path 2022-10-22 14:19:08 +02:00
Nicolas Chappe
a9a21e784d Codechange: Always set the ODATFB_NEAREST_DEPOT flag for 'any depot' orders 2022-10-22 14:19:08 +02:00
Jonathan G Rennison
29a1e49c28 Change various asserts to not be included in release builds 2022-10-22 12:34:54 +01:00
Bouke Haarsma
bda602f4b0 Fix: reduce framerate overhead on train ticks
Tick() is a noop for all but front-engine / crashed vehicles. Starting a framerate is rather cheap, but not free, and introduces a lot of overhead for such close loops.
2022-10-16 15:13:29 +02:00
Jonathan G Rennison
7f782a1bc3 Fix calculating train curve speed limit on dual rail type tiles 2022-10-15 22:14:21 +01:00
Jonathan G Rennison
38c2fa3b66 Add a change counter value special order type 2022-10-13 20:09:20 +01:00
Jonathan G Rennison
839746d2bb Fix template train move/sell command category for build while paused 2022-09-16 13:06:08 +01:00
Jonathan G Rennison
33e3e571d3 Return specific error when wagon purchase fails due to wrong depot type
See: #419
2022-09-07 20:01:49 +01:00
Jonathan G Rennison
a97d5cb333 Fix incorrect template replacement error message when chain not buildable
And no specific error returned

See: #419
2022-09-07 19:42:06 +01:00
Jonathan G Rennison
e3896b69d3 Fix #416: Division by zero for trains of 0 mass
In maximum achievable speed estimator
2022-09-04 18:20:09 +01:00
Jonathan G Rennison
bc920df63a Fix excessive braking for slopes with realistic braking
Unit conversion issue between potential and kinetic energies
2022-08-04 21:43:22 +01:00
Jonathan G Rennison
cbabbb6db6 Fix train braking behaviour when lookahead is aspect limited
When lookahead end is within the reservation end
2022-07-30 20:39:16 +01:00
Jonathan G Rennison
71b6d7a502 Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/arabic_egypt.txt
#	src/station_cmd.cpp
#	src/station_cmd.h
#	src/timetable_cmd.cpp
#	src/train_cmd.cpp
2022-07-30 20:38:34 +01:00
Patric Stout
979704271b Fix: reverse train direction command did not validate the given vehicle properly (#9947)
You could give a wagon in the chain to reverse (which makes no
functional sense ofc). In result, only parts of the vehicle were
reversing, leading to weird crashes.
2022-07-09 12:28:20 +02:00
Jonathan G Rennison
c6ae82b611 Fix 9ff161e4 boosting lookahead braking stats but not actual brake forces 2022-07-01 23:39:02 +01:00
Jonathan G Rennison
bd28d5a239 Use order state at reservation time for signal mode tracerestrict eval 2022-07-01 00:33:59 +01:00
Jonathan G Rennison
78ae295dfe Add combined normal and shunt aspect signal style flag 2022-06-27 18:51:26 +01:00
Jonathan G Rennison
a6e3467d58 Fix virtual train consist change callbacks being run before cargotype set
When instantiating virtual train from non-buildable template train

See: #402

Also fixes instantiating virtual train from train not refitting leading
vehicle.
2022-06-27 01:27:35 +01:00
Jonathan G Rennison
5b5fbaa476 Fix reservation error when a reserve through signal was the last tile
When there were no junctions earlier in the reservation
2022-06-26 16:28:23 +01:00
Jonathan G Rennison
24e965061c Fix limit train lookahead to signal aspect when starting
From depot and within signal sighting distance (e.g. reverse)
2022-06-25 01:17:24 +01:00
Jonathan G Rennison
b6e099121a Fix limit train lookahead to signal aspect within signalled tunnel/bridges 2022-06-22 00:24:13 +01:00
Jonathan G Rennison
9ff161e453 Boost realistic braking stats of trains affected by the freight multiplier 2022-06-19 18:57:40 +01:00