Andreas Schmitt
c1bf236a26
Rewrite the ATC logic
...
Now signals store speed information with a timeout for this data's validity
2021-06-20 20:40:33 +02:00
Andreas Schmitt
61669868bf
Removed change and updated signal count
2021-06-20 20:40:33 +02:00
Andreas Schmitt
5d20b9397c
Revert "Try something"
...
This reverts commit 475a097f36a70383d50ee68dac38b5ce087a1eb1.
2021-06-20 20:40:33 +02:00
Andreas Schmitt
02278f7a6f
Try something
...
This doesn't work but hey... it's broken already in combination with realistic breaking
2021-06-20 20:40:33 +02:00
Andreas Schmitt
debc504e59
Add a setting for train speed adaptation
...
Prior to this change, without realistic breaking, trains would continuously run into the train in front of them. This makes them adjust their speed based on trains in front of them
2021-06-20 20:40:33 +02:00
Jonathan G Rennison
1002c6d9d2
Fix various compiler warnings
...
See: #267
2021-06-11 22:54:27 +01:00
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
2021-05-29 21:08:25 +02:00
rubidium42
2e136285e1
Codechange: move from C-string to std::string for DoCommand
2021-05-29 19:02:18 +02:00
Jonathan G Rennison
f703e23322
Fix assert fail when ChooseTrainTrack called on disallowed 90 degree turn
2021-05-29 02:22:27 +01:00
rubidium42
b791ffc6de
Fix: do not hide parameter by local variable with the same name
2021-05-27 18:30:56 +02:00
Jonathan G Rennison
a896753ecc
Fix #9264 : Do not attach temporary wagons to free wagon chains when autoreplacing
2021-05-23 21:05:55 +02:00
Jonathan G Rennison
8eb34b2f10
Do not attach temporary wagons to free wagon chains when autoreplacing
...
See: https://github.com/OpenTTD/OpenTTD/issues/9264
2021-05-15 22:32:50 +01:00
rubidium42
44ca7d9377
Change: Use gender-neutral pronouns
2021-05-15 10:16:48 +02:00
Jonathan G Rennison
6b2a05d02e
Drive through depots: Allow moving between ends when current exit blocked
2021-04-25 18:45:11 +01:00
Jonathan G Rennison
6a62b94263
Add NewGRF railtype flag to disable realistic braking for vehs of that type
...
See: #242
2021-04-15 20:56:45 +01:00
Jonathan G Rennison
ba2e6087b2
Add train cache flag for whether train using realistic braking physics
2021-04-15 20:56:45 +01:00
Jonathan G Rennison
b514d29db1
Replace TrainCache::cached_tilt with a flags field
2021-04-15 20:56:45 +01:00
Jonathan G Rennison
686bcb8009
Fix no vehicle tile hash update when moving train in drive-through depot
2021-04-14 19:50:16 +01:00
Jonathan G Rennison
8e92a6844f
Add a "misc_debug" console command
...
Add a flag to open veh window when TrainBrakesOverheatedBreakdown called
2021-04-12 00:18:13 +01:00
Jonathan G Rennison
5d5100449e
Adjust realistic braking physics
...
Realistic acceleration uses 4 x the mass for acceleration as braking
Use 4 x mass for realistic braking as well to match
Increase per train length braking force
Add a power-based per train length braking force
2021-04-11 23:45:00 +01:00
Jonathan G Rennison
d484c32d44
Reduce sensitivity of train overheated breakdown
2021-04-11 22:53:02 +01:00
Jonathan G Rennison
26a123b708
Realistic braking: Cache offset of centre of mass of train
2021-04-03 21:25:04 +01:00
Jonathan G Rennison
dc8680eec5
Ensure that cached decel values of free wagon chain heads are zeroed
2021-04-01 01:23:08 +01:00
Jonathan G Rennison
8fd4f65a85
Validate lookahead reservation end OK before calling FollowTrainReservation
2021-04-01 00:36:13 +01:00
Jonathan G Rennison
5b5e068e52
Don't check safe waiting point in FollowTrainReservation if result unused
2021-03-31 22:39:44 +01:00
Jonathan G Rennison
1cbb9960af
Clear train lookahead when reaching an unreserved diverging junction
2021-03-31 22:09:41 +01:00
Jonathan G Rennison
49676552bb
Use a flags parameter for ChooseTrainTrack mode
2021-03-31 21:42:36 +01:00
Jonathan G Rennison
48498969eb
Fix through load crash when rear unit is longer than platform with no capacity
2021-03-28 13:48:35 +01:00
Jonathan G Rennison
923b2eb0a9
Fix tracerestrict train is loading status condition when predicting orders
2021-03-26 00:08:25 +00:00
Jonathan G Rennison
bac3bff716
Increase realistic braking signal sighting distance
...
(Outside of signalled tunnel/bridges)
2021-03-19 00:19:53 +00:00
Jonathan G Rennison
4386da53ee
Slightly overestimate descents when deciding if reservation long enough
2021-03-18 14:09:19 +00:00
Jonathan G Rennison
8cf2b827a1
Avoid pessimising braking speed when descending slope
...
When calculating speed using variable braking force
2021-03-18 14:09:19 +00:00
Jonathan G Rennison
843dce94a4
Fix mispredicted stop location when through-loading
...
When using realistic braking and skipped train parts have different
lengths.
2021-03-18 10:37:07 +00:00
Jonathan G Rennison
f7dcd66f08
Fix unnecessary braking when leaving station with order without non-stop flag
2021-03-17 18:00:12 +00:00
Jonathan G Rennison
dbbe1bb3e4
Fix trains passing signals in original acceleration with braking models
2021-03-01 02:14:42 +00:00
Jonathan G Rennison
056606d2b6
Fix ApplyLookAheadItem assuming current_order == order in order list
...
Fixes trains with no orders failing to brake in advance of stations
2021-02-27 17:49:59 +00:00
Jonathan G Rennison
460d504269
Fix order index wrapping when depth exceeded in AdvanceOrderIndex
2021-02-27 14:57:17 +00:00
Jonathan G Rennison
dfecdf3afb
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/dock_gui.cpp
# src/rail_gui.cpp
# src/road_gui.cpp
# src/terraform_gui.cpp
# src/vehicle.cpp
# src/video/allegro_v.cpp
# src/video/cocoa/cocoa_v.mm
# src/video/dedicated_v.cpp
# src/video/sdl2_v.cpp
# src/video/sdl_v.cpp
# src/video/win32_v.cpp
2021-02-21 11:54:24 +00:00
frosch
d9b4413bc9
Codechange: rename sound ids to make more sense. ( #8701 )
2021-02-20 19:01:04 +01:00
Jonathan G Rennison
8fc4f13672
Fix train speed not being set to 0 for timetabled wait at waypoint orders
2021-02-15 21:54:46 +00:00
Jonathan G Rennison
35d720b0ad
Add tracerestrict PBS end signal conditional
...
This is for realistic braking long reserve
2021-02-13 02:12:16 +00:00
Jonathan G Rennison
1b0e602ed5
Do not fill reservation lookahead if reservation could still be cancelled
...
If ExtendTrainReservation finds a safe waiting point, this could
later not be a safe waiting point after advancing orders, due to
conditionally reserve through routing restrictions
2021-02-11 22:31:48 +00:00
Jonathan G Rennison
8a814bbfe3
Add release slot train order
2021-02-10 22:30:22 +00:00
Jonathan G Rennison
62ea3b7794
Use original speeds when braking at station in original braking mode
...
Partially reverts: 628077d0
2021-02-10 18:05:15 +00:00
Jonathan G Rennison
0cc994c870
Save/restore implicit and TT order indices in VehicleOrderSaver
...
Fix implicit/TT order indices being unexpectedly changed by
UpdateOrderDest if an order target is unsuitable.
This could assert UpdateVehicleTimetable
2021-02-04 21:49:05 +00:00
Jonathan G Rennison
48395cb2db
Fix assert when freeing train reservation from track edit command
2021-02-04 20:54:37 +00:00
Jonathan G Rennison
5283e16946
Fix misspelling of variable name: acceleration_type
2021-02-04 17:20:02 +00:00
Jonathan G Rennison
d52eebb829
Set value of cached_uncapped_decel in original acceleration model
...
This is to avoid false positive cache mismatch messages
2021-02-03 21:30:36 +00:00
Jonathan G Rennison
c1f1b5f3b3
Give monorail/maglev larger realistic braking deceleration limits
2021-02-03 21:22:09 +00:00
Jonathan G Rennison
4e1b1bc91e
Fix wrong power units used for maglev realistic braking deceleration calc
2021-02-03 20:54:34 +00:00