Commit Graph

2012 Commits

Author SHA1 Message Date
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
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
2022-06-19 12:44:15 +01:00
Jonathan G Rennison
99ee4b13ce Realistic braking: Cache train overall z position
Refresh cache at a variable rate depending on train length and
weight distribution
2022-06-03 00:41:41 +01:00
Jonathan G Rennison
6d877b5e70 Reduce redundant calls to get current max speed for trains and RVs
Between ShowVisualEffect() and UpdateSpeed()
2022-06-01 20:05:45 +01:00
Jonathan G Rennison
502980ba61 Support railtype-dependant GRF train speed limits with realistic braking
See: #389
2022-05-24 21:50:38 +01:00
Jonathan G Rennison
92142e5684 Add routing restriction action to make exempt from speed adaptation 2022-03-06 22:39:53 +00:00
Jonathan G Rennison
e5a421b65a Merge branch 'master' into jgrpp
# Conflicts:
#	src/economy.cpp
#	src/linkgraph/refresh.cpp
#	src/order_cmd.cpp
#	src/saveload/vehicle_sl.cpp
#	src/station.cpp
#	src/station_base.h
#	src/timetable_cmd.cpp
#	src/timetable_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehicle_cmd.cpp
2022-03-04 18:17:44 +00:00
Jonathan G Rennison
909b20ee68 Implement train speed adaptation on signalled tunnels/bridges
See: #373
2022-02-21 18:57:50 +00:00
Niels Martin Hansen
e68bf58989 Codechange: Use anonymous union for vehicle orders/old orders list 2022-02-15 20:01:10 +01:00
Jonathan G Rennison
beb6d01fe8 Improve handling of conditional order waiting loops
Do not leave station/depot/waypoint at all if conditional order
loop would result in re-starting waiting/loading

Only actually leave and update timetable at end of loop

Rate-limit loop checks regardless of timetabled wait time
2022-01-19 00:10:49 +00:00
Jonathan G Rennison
904ff6757d Add slot support to road vehicles, ships and aircraft 2022-01-19 00:10:49 +00:00
Jonathan G Rennison
543433218c Ensure that timetable and scheduled dispatch windows redrawn as required
Reduce inefficient window and shared order list iteration
2022-01-15 00:21:31 +00:00
Jonathan G Rennison
a4ea155d33 Merge PR #357 into jgrpp 2022-01-11 20:44:47 +00:00
Yourself
7823c81597 Add: Through load speed limit setting 2022-01-08 22:27:43 -07:00
Yourself
aa7413a89f Fix: Require non-zero capacity for refit cargo type 2022-01-06 15:42:22 -07:00
Jonathan G Rennison
30817c3915 Fix VRF_BEYOND_PLATFORM_END not being cleared when switching order 2022-01-03 12:47:44 +00:00
Jonathan G Rennison
f40191b3c0 Add hysteresis to depot search max penalty in missing depot order mode
See: #345
2021-12-27 17:21:00 +00:00
Michael Lutz
41fa16f325 Codechange: Don't use globals for return values from vehicle command procs. 2021-12-16 22:28:32 +01:00
Michael Lutz
13528bfcd0 Codechange: Un-bitstuff all remaining commands. 2021-12-16 22:28:32 +01:00
Michael Lutz
21675ec7e2 Codechange: Un-bitstuff vehicle/engine commands. 2021-12-16 22:28:32 +01:00
Michael Lutz
4f3ea3907e Codechange: Un-bitstuff commands taking a ClientID (i.e. CMD_CLIENT_ID). 2021-12-16 22:28:32 +01:00
Michael Lutz
0f64ee5ce1 Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
2021-12-16 22:28:32 +01:00
Michael Lutz
e740c24eb7 Codechange: Template DoCommand to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
2021-12-16 22:28:32 +01:00