Commit Graph

1857 Commits (117eb6637dbbb74e93cd3e0951fb81b263dd850c)

Author SHA1 Message Date
Jonathan G Rennison 11e49ef99e Only apply signal speed restrictions from the front direction 3 years ago
Jonathan G Rennison 5fb3eb0bb9 Adjust signal speed restriction timeouts when date or day length changed 3 years ago
Jonathan G Rennison e16c29ef7d Use already found iterator for erasing from hash map 3 years ago
Jonathan G Rennison 62075c88de Apply ATC speed restriction as advisory to prevent instant braking
Remove redundant function
3 years ago
Jonathan G Rennison 93be763301 Update ticks per tile constant 3 years ago
Jonathan G Rennison ee2d77ecab Move train speed adaptation structs to separate header file 3 years ago
Jonathan G Rennison 3bba9ef37a Fix setting name 3 years ago
Jonathan G Rennison e15acd3af8 Avoid train speed adaption overhead when setting not enabled 3 years ago
Jonathan G Rennison 28e39c9045 Fix trailing whitespace 3 years ago
Andreas Schmitt 669770f209 Fix a few issues and reset everything on start of new game 3 years ago
Andreas Schmitt 86cfefba08 Fix signed unsigned overflow 3 years ago
Andreas Schmitt c1bf236a26 Rewrite the ATC logic
Now signals store speed information with a timeout for this data's validity
3 years ago
Andreas Schmitt 61669868bf Removed change and updated signal count 3 years ago
Andreas Schmitt 5d20b9397c Revert "Try something"
This reverts commit 475a097f36a70383d50ee68dac38b5ce087a1eb1.
3 years ago
Andreas Schmitt 02278f7a6f Try something
This doesn't work but hey... it's broken already in combination with realistic breaking
3 years ago
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
3 years ago
Jonathan G Rennison 1002c6d9d2 Fix various compiler warnings
See: #267
3 years ago
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 3 years ago
rubidium42 2e136285e1 Codechange: move from C-string to std::string for DoCommand 3 years ago
Jonathan G Rennison f703e23322 Fix assert fail when ChooseTrainTrack called on disallowed 90 degree turn 3 years ago
rubidium42 b791ffc6de Fix: do not hide parameter by local variable with the same name 3 years ago
Jonathan G Rennison a896753ecc Fix #9264: Do not attach temporary wagons to free wagon chains when autoreplacing 3 years ago
Jonathan G Rennison 8eb34b2f10 Do not attach temporary wagons to free wagon chains when autoreplacing
See: https://github.com/OpenTTD/OpenTTD/issues/9264
3 years ago
rubidium42 44ca7d9377 Change: Use gender-neutral pronouns 3 years ago
Jonathan G Rennison 6b2a05d02e Drive through depots: Allow moving between ends when current exit blocked 3 years ago
Jonathan G Rennison 6a62b94263 Add NewGRF railtype flag to disable realistic braking for vehs of that type
See: #242
3 years ago
Jonathan G Rennison ba2e6087b2 Add train cache flag for whether train using realistic braking physics 3 years ago
Jonathan G Rennison b514d29db1 Replace TrainCache::cached_tilt with a flags field 3 years ago
Jonathan G Rennison 686bcb8009 Fix no vehicle tile hash update when moving train in drive-through depot 3 years ago
Jonathan G Rennison 8e92a6844f Add a "misc_debug" console command
Add a flag to open veh window when TrainBrakesOverheatedBreakdown called
3 years ago
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
3 years ago
Jonathan G Rennison d484c32d44 Reduce sensitivity of train overheated breakdown 3 years ago
Jonathan G Rennison 26a123b708 Realistic braking: Cache offset of centre of mass of train 3 years ago
Jonathan G Rennison dc8680eec5 Ensure that cached decel values of free wagon chain heads are zeroed 3 years ago
Jonathan G Rennison 8fd4f65a85 Validate lookahead reservation end OK before calling FollowTrainReservation 3 years ago
Jonathan G Rennison 5b5e068e52 Don't check safe waiting point in FollowTrainReservation if result unused 3 years ago
Jonathan G Rennison 1cbb9960af Clear train lookahead when reaching an unreserved diverging junction 3 years ago
Jonathan G Rennison 49676552bb Use a flags parameter for ChooseTrainTrack mode 3 years ago
Jonathan G Rennison 48498969eb Fix through load crash when rear unit is longer than platform with no capacity 3 years ago
Jonathan G Rennison 923b2eb0a9 Fix tracerestrict train is loading status condition when predicting orders 3 years ago
Jonathan G Rennison bac3bff716 Increase realistic braking signal sighting distance
(Outside of signalled tunnel/bridges)
3 years ago
Jonathan G Rennison 4386da53ee Slightly overestimate descents when deciding if reservation long enough 3 years ago
Jonathan G Rennison 8cf2b827a1 Avoid pessimising braking speed when descending slope
When calculating speed using variable braking force
3 years ago
Jonathan G Rennison 843dce94a4 Fix mispredicted stop location when through-loading
When using realistic braking and skipped train parts have different
lengths.
3 years ago
Jonathan G Rennison f7dcd66f08 Fix unnecessary braking when leaving station with order without non-stop flag 3 years ago
Jonathan G Rennison dbbe1bb3e4 Fix trains passing signals in original acceleration with braking models 3 years ago
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
3 years ago
Jonathan G Rennison 460d504269 Fix order index wrapping when depth exceeded in AdvanceOrderIndex 3 years ago
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
3 years ago
frosch d9b4413bc9
Codechange: rename sound ids to make more sense. (#8701) 3 years ago
Jonathan G Rennison 8fc4f13672 Fix train speed not being set to 0 for timetabled wait at waypoint orders 3 years ago
Jonathan G Rennison 35d720b0ad Add tracerestrict PBS end signal conditional
This is for realistic braking long reserve
3 years ago
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
3 years ago
Jonathan G Rennison 8a814bbfe3 Add release slot train order 3 years ago
Jonathan G Rennison 62ea3b7794 Use original speeds when braking at station in original braking mode
Partially reverts: 628077d0
3 years ago
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
3 years ago
Jonathan G Rennison 48395cb2db Fix assert when freeing train reservation from track edit command 3 years ago
Jonathan G Rennison 5283e16946 Fix misspelling of variable name: acceleration_type 3 years ago
Jonathan G Rennison d52eebb829 Set value of cached_uncapped_decel in original acceleration model
This is to avoid false positive cache mismatch messages
3 years ago
Jonathan G Rennison c1f1b5f3b3 Give monorail/maglev larger realistic braking deceleration limits 3 years ago
Jonathan G Rennison 4e1b1bc91e Fix wrong power units used for maglev realistic braking deceleration calc 3 years ago
Jonathan G Rennison a9b82b817b Prevent signed overflow of lookahead position 3 years ago
Jonathan G Rennison b7ddd486cf Merge branch 'master' into jgrpp
# Conflicts:
#	cmake/CompileFlags.cmake
#	src/aircraft_cmd.cpp
#	src/blitter/32bpp_anim.cpp
#	src/cargopacket.cpp
#	src/cheat_gui.cpp
#	src/company_cmd.cpp
#	src/company_gui.cpp
#	src/core/pool_func.hpp
#	src/date.cpp
#	src/economy.cpp
#	src/error_gui.cpp
#	src/ground_vehicle.cpp
#	src/ground_vehicle.hpp
#	src/group_gui.cpp
#	src/industry_cmd.cpp
#	src/lang/dutch.txt
#	src/lang/french.txt
#	src/lang/german.txt
#	src/linkgraph/linkgraph_gui.cpp
#	src/linkgraph/mcf.cpp
#	src/network/network_content.cpp
#	src/network/network_server.cpp
#	src/network/network_udp.cpp
#	src/newgrf_engine.cpp
#	src/newgrf_station.cpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/pathfinder/follow_track.hpp
#	src/pathfinder/yapf/yapf_common.hpp
#	src/saveload/saveload.cpp
#	src/settings_gui.cpp
#	src/station_cmd.cpp
#	src/station_kdtree.h
#	src/string_func.h
#	src/table/settings.ini
#	src/tgp.cpp
#	src/timetable_cmd.cpp
#	src/timetable_gui.cpp
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/train_cmd.cpp
#	src/train_gui.cpp
#	src/tree_gui.cpp
#	src/tunnelbridge_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_gui.cpp
#	src/video/sdl2_v.cpp
#	src/video/sdl_v.cpp
#	src/video/win32_v.cpp
#	src/viewport.cpp
#	src/viewport_sprite_sorter_sse4.cpp
#	src/window.cpp
3 years ago
Jonathan G Rennison f9956d88c3 Merge branch 'master' into jgrpp
# Conflicts:
#	src/aircraft_cmd.cpp
#	src/company_gui.cpp
#	src/lang/arabic_egypt.txt
#	src/lang/czech.txt
#	src/lang/esperanto.txt
#	src/lang/faroese.txt
#	src/lang/finnish.txt
#	src/lang/german.txt
#	src/lang/korean.txt
#	src/lang/latvian.txt
#	src/lang/malay.txt
#	src/lang/polish.txt
#	src/lang/spanish.txt
#	src/lang/spanish_MX.txt
#	src/lang/unfinished/urdu.txt
#	src/main_gui.cpp
#	src/rail_cmd.cpp
#	src/rail_gui.cpp
#	src/road_cmd.cpp
#	src/settings_type.h
#	src/station_cmd.cpp
#	src/table/settings.ini
3 years ago
Jonathan G Rennison 6c3e5642f8 Merge branch 'master' into jgrpp
# Conflicts:
#	cmake/CompileFlags.cmake
#	src/crashlog.cpp
#	src/fileio.cpp
#	src/fileio_func.h
#	src/fios_gui.cpp
#	src/ini_load.cpp
#	src/ini_type.h
#	src/lang/english.txt
#	src/lang/german.txt
#	src/lang/korean.txt
#	src/network/network_client.cpp
#	src/order_base.h
#	src/order_cmd.cpp
#	src/os/windows/win32.cpp
#	src/road_cmd.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/settings.cpp
#	src/station_cmd.cpp
#	src/stdafx.h
#	src/table/settings.ini
#	src/tree_cmd.cpp
#	src/tree_gui.cpp
#	src/vehicle_base.h
#	src/video/cocoa/cocoa_v.mm
#	src/video/cocoa/event.mm
#	src/video/cocoa/wnd_quartz.mm
#	src/viewport.cpp
#	src/widgets/tree_widget.h
3 years ago
Jonathan G Rennison 4e0804b791 Fix const issues around GetTrainStopLocation/GetCurrentMaxSpeed 3 years ago
Jonathan G Rennison 87c87649b8 Fix lookahead init inside a signalled tunnel/bridge only filling interior 3 years ago
Jonathan G Rennison 62fffddb3f Don't mark train stuck if no reachable track in TryPathReserve 3 years ago
Jonathan G Rennison 628077d0bb Fix missing stop due to speed when entering station with lookahead 3 years ago
Jonathan G Rennison ed0ffb6220 Add feature: realistic train braking
Add setting to select train braking model.
3 years ago
Jonathan G Rennison 1838e8939f Improve handling of reversing inside bidi signalled tunnel/bridge
Avoid train crashes when reversing trains either side of entrance tile
3 years ago
Jonathan G Rennison e0893de5c3 Set tunnel/bridge PBS exit to red when leaving 4 years ago
Jonathan G Rennison aacb70d371 Debug: Extend random debug logging to also include state checksum updates 4 years ago
Jonathan G Rennison 4f44540eb9 Fix false positive desync messages for vehicle cached weight/length 4 years ago
Jonathan G Rennison 6a6d9f3773 Fix tunnel/bridge PBS start tile in TryPathReserve 4 years ago
Patric Stout cd36e17160
Fix: don't allow free-wagon-chains to exceed max-train-length (#8533)
This makes no sense, that a free-wagon-chain could be larger than
the maximum length of a train, as you cannot put an engine in
front of that anyway. And it prevents run-away AIs making very
silly long free-wagon-chains.
4 years ago
Jonathan G Rennison d666036ffd TBTR: Close vehicles window when acquiring idle vehicle for replacement
This fixes possible duplicate vehicle windows, which is not allowed
4 years ago
Jonathan G Rennison 515aeb04e0 TBTR: Add support for vehicle reversed flag 4 years ago
Jonathan G Rennison e9f7783327 TBTR: Allow flipping direction of vehicles in template editor 4 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 4 years ago
Jonathan G Rennison d1e23551ec Fix handling of bridge signals when reversing inside wormhole
Fix handling of train detection when moving in wrong direction
4 years ago
Jonathan G Rennison d32a282112 Fix bridges not being redrawn after all signals reset when cleared 4 years ago
Patric Stout dff7ee8e1c
Fix #7611: keeps news about accidents around after vehicle is cleaned up (#8497)
When a vehicle is cleaned up, all news that points to the news is
also removed. This was a bit evil, as it would also remove any
news related to crashed, acting like the crash never happened.
This left players a bit in the dark what was going on exactly.
4 years ago
Matt Kimber 9b28b15e67 Codechange: create MutableSpriteCache to remove the need to cast Vehicle to a mutable type in render methods 4 years ago
Andy 0f91cb0479
Fix: GetCurveSpeedLimit needs railtype from current tile (#8466) 4 years ago
Jonathan G Rennison f2c492c351 Fix reversing behind waypoint/signal in bridges/tunnels 4 years ago
Jonathan G Rennison 933d75f532 Clear unused train cache fields, fixes warning spam on MP client load 4 years ago
Jonathan G Rennison 9efeb3551a Tunnel/bridge signal simulation spacing is now a company setting 4 years ago
Jonathan G Rennison 53af61fc9e Do not charge vehicle running costs when waiting in depot due to timetable
See: #202
4 years ago
Jonathan G Rennison 92ca965ef7 Fix PBS rail type handling with incorrect GRF rail type compatibility 4 years ago
Jonathan G Rennison 5e7b469d16 Fix reversing train inside signalled bridge/tunnel not unreserving exit 4 years ago
Jonathan G Rennison cce6d731a1 TBTR: Delete orphaned virtual trains on client disconnection 4 years ago
Jonathan G Rennison bd2649c19e Avoid unnecessary redrawing of vehicle list windows
Redraw info section every tick if values have changed
4 years ago
Jonathan G Rennison a474e71243 Viewport: Cache landscape pixels in map mode
Avoid invalidating landscape pixels for non-landscape updates
(vehicles, overlays, etc.)
4 years ago
Jonathan G Rennison 352b361e1b Viewport: Replace viewport mark dirty if zoom level below with flags param
Fix missing flags for tracerestrict and effect vehicles
4 years ago
Jonathan G Rennison 84dd35b685 Add drive-through train depot emulation (default off) 4 years ago
Jonathan G Rennison 11a9a4dc0c Fix no error message when attaching new template/virtual vehicle fails
See: #187
4 years ago
Jonathan G Rennison 817bc44a3e Initial implementation of tracerestrict counter mechanism 4 years ago
Jonathan G Rennison d2594ece79 Add routing restrictions action to control news reports about stuck trains 4 years ago
Jonathan G Rennison cc6be16422 Add news setting for trains waiting due to routing restrictions 4 years ago