Jonathan G Rennison
c929f7075e
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/SourceList.cmake
# src/build_vehicle_gui.cpp
# src/company_gui.cpp
# src/console_cmds.cpp
# src/depot_base.h
# src/elrail.cpp
# src/network/core/udp.cpp
# src/network/network_admin.cpp
# src/network/network_chat_gui.cpp
# src/network/network_gui.cpp
# src/network/network_server.cpp
# src/newgrf.cpp
# src/newgrf_engine.cpp
# src/newgrf_railtype.cpp
# src/newgrf_railtype.h
# src/newgrf_storage.h
# src/os/unix/crashlog_unix.cpp
# src/rail.h
# src/rail_cmd.cpp
# src/rail_gui.cpp
# src/road_cmd.cpp
# src/road_map.h
# src/saveload/labelmaps_sl.cpp
# src/settings_gui.cpp
# src/settings_type.h
# src/sl/oldloader_sl.cpp
# src/station_cmd.cpp
# src/station_gui.cpp
# src/table/settings/world_settings.ini
# src/tests/test_script_admin.cpp
# src/textfile_gui.cpp
# src/toolbar_gui.cpp
# src/train_cmd.cpp
# src/tunnelbridge_cmd.cpp
# src/vehicle_gui.cpp
# src/widget.cpp
# src/window.cpp
# src/window_gui.h
# src/window_type.h
7 months ago
Peter Nelson
43aa91a7f5
Fix #11437 : Flipped shorter rail vehicles disappear in windows. ( #11446 )
...
Mixed signed/unsigned strikes again, causing an incorrect sprite offset for shortened vehicles.
7 months ago
Rubidium
c9276c2959
Codechange: replace x.size() == 0 with x.empty()
8 months ago
Jonathan G Rennison
0620026d56
Tracerestrict: Add long reserve (unless stopping) mode
...
Requires realistic braking
8 months ago
Jonathan G Rennison
90192f9537
TBTR: Implement cost estimation for template replacement
...
Simplified operation, CMD_NO_TEST is still in use
9 months ago
Jonathan G Rennison
ad3980e596
Add setting for whether non-leading train engines keep custom names
9 months ago
Jonathan G Rennison
3afb732c37
Fix #11307 : Incorrect GroupStatistics after selling leading wagon
...
When this results in a countable consist
9 months ago
Jonathan G Rennison
cd2a368d77
Fix #11307 : Incorrect GroupStatistics after selling leading wagon
...
When this results in a countable consist
9 months ago
Jonathan G Rennison
a18f3274b4
Rename close window functions to match upstream
9 months ago
PeterN
acd7d3c913
Codechange: Rename *Railtype* to *RailType* for consistency. ( #11287 )
9 months ago
Tyler Trahan
77173a6a10
Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes
9 months ago
Tyler Trahan
fca2b37726
Codechange: Move Ticks into their own class
9 months ago
Jonathan G Rennison
b0331c84b3
TBTR: Refactor handling of vehicle start/stop state
10 months ago
Jonathan G Rennison
d7d9c05cbd
TBTR: Fix various refit issues in refit as incoming vehicle mode
...
Allow refits to fail in refit as incoming vehicle mode
Remove virtual train mode from CmdRefitVehicle
Fix refit as incoming for non-head parts being free
10 months ago
Jonathan G Rennison
64df35067a
TBTR: Handle setting unit direction separately from refits
10 months ago
Jonathan G Rennison
2cf95eea36
TBTR: Refactor train/template match function to return difference flags
10 months ago
Tyler Trahan
b012d1100c
Fix #10334 : Store separate newgrf-safe version of date_of_last_service. ( #11124 )
...
This value is not changed when the date cheat is used, which caused issues with changing properties based on service date.
Co-authored-by: Peter Nelson <peter1138@openttd.org>
(cherry picked from commit 9a602ff304
)
10 months ago
Tyler Trahan
9a602ff304
Fix #10334 : Store separate newgrf-safe version of date_of_last_service. ( #11124 )
...
This value is not changed when the date cheat is used, which caused issues with changing properties based on service date.
Co-authored-by: Peter Nelson <peter1138@openttd.org>
10 months ago
Jonathan G Rennison
4f875012b6
Do not unnecessarily extend train reservations when passing signal
...
When the signal is a next-only or non-aspect-incrementing type, and
its maximum lookahead is not beyond the current end of the reservation
11 months ago
Rubidium
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
11 months ago
merni-ns
e1cb4d2397
Fix #10975 : Clear a non-head engine's name ( #10976 )
...
(cherry picked from commit 1be668c2e4
)
1 year ago
merni-ns
1be668c2e4
Fix #10975 : Clear a non-head engine's name ( #10976 )
1 year ago
Jonathan G Rennison
02549c5224
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/CompileFlags.cmake
# src/cargomonitor.cpp
# src/core/CMakeLists.txt
# src/economy.cpp
# src/landscape.cpp
# src/linkgraph/flowmapper.cpp
# src/linkgraph/linkgraph_gui.cpp
# src/linkgraph/linkgraphschedule.cpp
# src/misc_gui.cpp
# src/newgrf_generic.cpp
# src/newgrf_storage.cpp
# src/rail_gui.cpp
# src/saveload/afterload.cpp
# src/saveload/station_sl.cpp
# src/script/script_gui.cpp
# src/station_cmd.cpp
# src/station_gui.cpp
# src/string_func.h
# src/terraform_cmd.cpp
1 year ago
PeterN
98788e865f
Fix #10502 : Refit engine before attaching free wagons. ( #10926 )
...
Caused by incorrect order of operations when buying a train engine with refit and attaching free wagons.
(cherry picked from commit ee2d0745e9
)
1 year ago
PeterN
ee2d0745e9
Fix #10502 : Refit engine before attaching free wagons. ( #10926 )
...
Caused by incorrect order of operations when buying a train engine with refit and attaching free wagons.
1 year ago
Jonathan G Rennison
a2c0e6aa18
Fix #10831 : Level crossing parts left barred after crossing tile removal ( #10874 )
1 year ago
Jonathan G Rennison
3a47b421b0
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/company_cmd.cpp
# src/core/overflowsafe_type.hpp
# src/economy.cpp
# src/engine_base.h
# src/ground_vehicle.cpp
# src/group_gui.cpp
# src/industry_cmd.cpp
# src/industry_gui.cpp
# src/newgrf_commons.cpp
# src/newgrf_engine.cpp
# src/newgrf_industries.cpp
# src/newgrf_object.cpp
# src/newgrf_roadstop.cpp
# src/newgrf_station.cpp
# src/rail_gui.cpp
# src/road_cmd.h
# src/road_gui.cpp
# src/saveload/afterload.cpp
# src/script/api/script_log.cpp
# src/script/api/script_log.hpp
# src/settings_gui.cpp
# src/settingsgen/settingsgen.cpp
# src/station_cmd.cpp
# src/station_cmd.h
# src/station_gui.cpp
# src/strgen/strgen.cpp
# src/string_func.h
# src/string_type.h
# src/table/settings/network_private_settings.ini
# src/tests/math_func.cpp
# src/textfile_gui.cpp
# src/timetable_gui.cpp
# src/town_cmd.cpp
# src/vehicle.cpp
# src/waypoint_cmd.cpp
# src/waypoint_cmd.h
# src/widgets/dropdown.cpp
1 year ago
Jonathan G Rennison
2ed248a61d
Merge branch 'master' into jgrpp
...
# Conflicts:
# .github/workflows/ci-build.yml
# .github/workflows/release-linux.yml
# src/aircraft_cmd.cpp
# src/airport_gui.cpp
# src/articulated_vehicles.cpp
# src/build_vehicle_gui.cpp
# src/company_gui.cpp
# src/genworld_gui.cpp
# src/gfx_layout.cpp
# src/misc_gui.cpp
# src/newgrf.cpp
# src/newgrf_config.h
# src/newgrf_engine.cpp
# src/news_gui.cpp
# src/order_gui.cpp
# src/roadveh_cmd.cpp
# src/saveload/saveload.h
# src/saveload/vehicle_sl.cpp
# src/ship_cmd.cpp
# src/statusbar_gui.cpp
# src/table/settings/network_private_settings.ini
# src/table/settings/network_settings.ini
# src/toolbar_gui.cpp
# src/train_cmd.cpp
# src/vehicle_gui.cpp
1 year ago
Jonathan G Rennison
7615c831aa
Avoid unnecessary checks when removing adjacent level crossing tile
1 year ago
Jonathan G Rennison
4ca0b43975
Fix train z pos after reversing at wrong-way signalled bridge wormhole
...
Could cause train disconnection or wrong wagon spacing
1 year ago
Jonathan G Rennison
90abfff45c
Fix adjacent level crossings left barred after removing middle of crossing
...
See: #517
1 year ago
Michael Lutz
7e906c7c59
Change: Preserve orders and related settings where possible when moving engines around in a train.
1 year ago
Michael Lutz
07449be876
Codechange: A vehicle that is not a front engine can't be removed from a vehicle group, so just remove a pointless function call.
1 year ago
Jonathan G Rennison
09e03fb6b2
Change TunnelBridgeIsFree across_only to a mode enum type
1 year ago
Jonathan G Rennison
8d501f2db1
Fix #10741 : Rail platforms left partially reserved after train crash ( #10751 )
1 year ago
Peter Nelson
4a5e413a6c
Cleanup: Remove unnecessary VehicleRandomBits()
...
Simple Random() assignment to byte does the same.
1 year ago
Jonathan G Rennison
8218476e89
Fix rail platforms being left partially reserved after train crash
1 year ago
Jonathan G Rennison
dc56add6a3
Fix rail platforms being left partially reserved after deleting train
...
Due to company being removed when infrastructure sharing in use
1 year ago
Rubidium
f74e26ca7e
Codechange: replace error/usererror printf variant with fmt variant and rename
1 year ago
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
1 year ago
Jonathan G Rennison
6e091c78b8
Use SoftClamp in DrawAircraftEngine, DrawShipEngine, DrawTrainEngine
1 year ago
Jonathan G Rennison
9521e7ef2b
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/elrail.cpp
# src/ground_vehicle.hpp
# src/landscape.cpp
# src/saveload/afterload.cpp
# src/saveload/saveload.h
# src/tile_cmd.h
# src/town_cmd.cpp
# src/tunnelbridge_cmd.cpp
1 year ago
Rubidium
e8af8daa68
Codechange: pass "ground vehicle" to GetTileSlopeZ since for tunnel/bridges there are two states
...
Previously it checked the position in non-driving direction to "guess" whether
a ground vehicle was using the function, so on tunnels/bridges it could either
return the Z of the (virtual) ground compared to the Z of the path the vehicle
would take.
1 year ago
Jonathan G Rennison
06e0f39aff
Add text label and departure board via orders
1 year ago
Jonathan G Rennison
c9c0436e58
Add company setting for remain at station if next order for same station
...
Set value on load for whether the save version had this enabled for trains
1 year ago
Jonathan G Rennison
1d05637d45
Add setting for rail depot maximum speed
1 year ago
Jonathan G Rennison
899eaf4ef3
Do not clear train lookahead when entering a train depot
1 year ago
Jonathan G Rennison
bd837a2fcd
TBTR: Mark vehicles as requiring service on template/replacement change
1 year ago
Jonathan G Rennison
1707f74d60
TBTR: Refactor template replacement code
...
Adjust conditions for re-using existing engines in depot
Reduce cost of searching for existing engines in depot
Reduce cost of vehicle chain membership tests
Improve replacement command error handling
Tidy up code in general
1 year ago
Jonathan G Rennison
3017cb63a9
Fix parameter shadowing in ApplyLookAheadItem
1 year ago
Jonathan G Rennison
277985ad9d
Fix parameter shadowing in GetTrainStopLocation
1 year ago
Jonathan G Rennison
8dca681c8c
Use btree_multimap for pending speed restrictions
...
Avoid unnecessary iteration when saving VESR chunk
1 year ago
Jonathan G Rennison
4ec6a99dd8
Add GetTileTrackStatus wrapper for when red signals part is not needed
1 year ago
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
1 year ago
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.
1 year ago
Jonathan G Rennison
f7d62a1767
Add road/tram type flag to disallow collisions with trains
1 year ago
Jonathan G Rennison
8d6e57799c
Fix various possible integer type conversion issues
1 year ago
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
1 year ago
rubidium42
6ba55e663e
Codechange: do not hide variables with other variables
1 year ago
Rubidium
fe2bcd2a58
Codechange: migrate size related functions to Map structure
1 year ago
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
1 year ago
Rubidium
375a5b8e3f
Codechange: refactor FindClosestDepot to not use pointers, but return a struct
1 year ago
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
1 year ago
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.
1 year ago
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
2 years ago
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
2 years ago
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
2 years ago
Peter Nelson
f5f035a22b
Codechange: Make use of Rect Width/Height helpers.
2 years ago
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.
2 years ago
Artin Alavi
fd4f148c62
Feature: Hotkey to honk a vehicle's horn ( #10110 )
2 years ago
Henry Wilson
59dbcdb5ba
Feature: Display power-to-weight ratio in ground vehicle details GUI
2 years ago
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
2 years ago
Jonathan G Rennison
4b08874583
Only show edge level crossing overlays even when safer crossings is off
2 years ago
Tyler Trahan
c19abebf8d
Feature: Multi-track level crossings ( #9931 )
2 years ago
Jonathan G Rennison
0f697c5501
CheckNextTrainTile should never take action for OT_WAITING orders
2 years ago
Nicolas Chappe
721d98a7d0
Feature: Constantly update destination of 'any depot' orders
2 years ago
Nicolas Chappe
a4052ca348
Codechange: Add VehicleOrderSaver::Restore()
2 years ago
Nicolas Chappe
7e7d943526
Codechange: [YAPF] Allow to retrieve the final tile of the calculated path
2 years ago
Nicolas Chappe
a9a21e784d
Codechange: Always set the ODATFB_NEAREST_DEPOT flag for 'any depot' orders
2 years ago
Jonathan G Rennison
29a1e49c28
Change various asserts to not be included in release builds
2 years ago
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.
2 years ago
Jonathan G Rennison
7f782a1bc3
Fix calculating train curve speed limit on dual rail type tiles
2 years ago
Jonathan G Rennison
38c2fa3b66
Add a change counter value special order type
2 years ago
Jonathan G Rennison
839746d2bb
Fix template train move/sell command category for build while paused
2 years ago
Jonathan G Rennison
33e3e571d3
Return specific error when wagon purchase fails due to wrong depot type
...
See: #419
2 years ago
Jonathan G Rennison
a97d5cb333
Fix incorrect template replacement error message when chain not buildable
...
And no specific error returned
See: #419
2 years ago
Jonathan G Rennison
e3896b69d3
Fix #416 : Division by zero for trains of 0 mass
...
In maximum achievable speed estimator
2 years ago
Jonathan G Rennison
bc920df63a
Fix excessive braking for slopes with realistic braking
...
Unit conversion issue between potential and kinetic energies
2 years ago
Jonathan G Rennison
cbabbb6db6
Fix train braking behaviour when lookahead is aspect limited
...
When lookahead end is within the reservation end
2 years ago
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
2 years ago
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.
2 years ago
Jonathan G Rennison
c6ae82b611
Fix 9ff161e4
boosting lookahead braking stats but not actual brake forces
2 years ago
Jonathan G Rennison
bd28d5a239
Use order state at reservation time for signal mode tracerestrict eval
2 years ago
Jonathan G Rennison
78ae295dfe
Add combined normal and shunt aspect signal style flag
2 years ago
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.
2 years ago
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
2 years ago
Jonathan G Rennison
24e965061c
Fix limit train lookahead to signal aspect when starting
...
From depot and within signal sighting distance (e.g. reverse)
2 years ago
Jonathan G Rennison
b6e099121a
Fix limit train lookahead to signal aspect within signalled tunnel/bridges
2 years ago
Jonathan G Rennison
9ff161e453
Boost realistic braking stats of trains affected by the freight multiplier
2 years ago
Jonathan G Rennison
22caac6529
Add game setting to limit train lookahead to signal aspect
...
In realistic braking mode when multi-aspect signalling enabled by GRF
2 years ago