Commit Graph

382 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison 18a42664fc Merge branch 'master' into jgrpp
Remove 'byte' typedef
1 week ago
Peter Nelson 64bc95722b Codechange: Cache train curve speed limit can be stored in 16 bits.
Cache curve speed modifier and max curve speed are both 16 bit values so can be stored in 16 bit types instead of 32 bit types.

(cherry picked from commit 3fc7b3b9a0)
2 months ago
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2 months ago
Jonathan G Rennison be4aea0dad Rationalise handling of train too heavy advice messages 3 months ago
Jonathan G Rennison fdd666f66a Merge tag '14.0-beta1' into jgrpp
# Conflicts:
#	src/3rdparty/squirrel/squirrel/sqcompiler.cpp
#	src/aircraft.h
#	src/animated_tile.h
#	src/base_consist.h
#	src/cargotype.h
#	src/company_gui.cpp
#	src/console_cmds.cpp
#	src/core/overflowsafe_type.hpp
#	src/engine_gui.cpp
#	src/industry_gui.cpp
#	src/lang/english.txt
#	src/music/extmidi.cpp
#	src/network/core/network_game_info.cpp
#	src/network/network_server.cpp
#	src/newgrf.cpp
#	src/newgrf_industries.cpp
#	src/order_base.h
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/order_type.h
#	src/os/macosx/misc_osx.cpp
#	src/os/windows/crashlog_win.cpp
#	src/rail_gui.cpp
#	src/rail_gui.h
#	src/roadveh.h
#	src/roadveh_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/company_sl.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/saveload/saveload_error.hpp
#	src/script/api/script_town.cpp
#	src/settingsgen/settingsgen.cpp
#	src/ship.h
#	src/ship_cmd.cpp
#	src/smallmap_gui.cpp
#	src/spritecache.cpp
#	src/stdafx.h
#	src/strgen/strgen.cpp
#	src/strgen/strgen.h
#	src/table/settings/script_settings.ini
#	src/timetable_cmd.cpp
#	src/timetable_gui.cpp
#	src/town.h
#	src/town_cmd.cpp
#	src/town_cmd.h
#	src/town_gui.cpp
#	src/train.h
#	src/train_cmd.cpp
#	src/tree_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehicle_cmd.cpp
#	src/vehicle_gui.cpp
#	src/vehiclelist.cpp
#	src/waypoint_base.h
#	src/widget.cpp
3 months ago
frosch b1718478c8 Codechange: Replace old non-standard attributes with C++17/20 standard attributes. 3 months ago
Jonathan G Rennison b01fd1607a Re-order various structs to reduce holes/padding 4 months ago
Tyler Trahan 735abfe111
Codechange: Split dates and timers into Economy and Calendar time (#10700) 4 months ago
Jonathan G Rennison 97e6f3062e Adding of _t to (u)int types, and WChar to char32_t
See: eaae0bb5e
4 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
10 months 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)
12 months 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.
12 months 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 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 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
1 year 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
Henry Wilson b304c06a4a Codechange: Use override specifier for Train and RoadVehicle structs 2 years ago
Henry Wilson 89cf0d5da8 Codechange: Factor cargotype weight conversion magic numbers 2 years ago
Jonathan G Rennison fc5e20719d Fix #423: Max TE/weight should not be shown for maglevs 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 c6ae82b611 Fix 9ff161e4 boosting lookahead braking stats but not actual brake forces 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 99ee4b13ce Realistic braking: Cache train overall z position
Refresh cache at a variable rate depending on train length and
weight distribution
2 years ago
Jonathan G Rennison 6d877b5e70 Reduce redundant calls to get current max speed for trains and RVs
Between ShowVisualEffect() and UpdateSpeed()
2 years ago
Jonathan G Rennison 502980ba61 Support railtype-dependant GRF train speed limits with realistic braking
See: #389
2 years ago
Jonathan G Rennison 5b7db9d849 Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/ci-build.yml
#	.github/workflows/commit-checker.yml
#	src/command.cpp
#	src/company_cmd.cpp
#	src/company_gui.cpp
#	src/crashlog.cpp
#	src/economy.cpp
#	src/lang/english.txt
#	src/lang/german.txt
#	src/lang/korean.txt
#	src/misc_gui.cpp
#	src/newgrf_config.cpp
#	src/openttd.cpp
#	src/settings_gui.cpp
#	src/ship_cmd.cpp
#	src/table/settings/gui_settings.ini
2 years ago
Tyler Trahan f4ca94d3f6 Codechange: Revenue is not the same as Income
Income is revenue minus costs. Let's name things correctly (without breaking the script API).
2 years ago
Jonathan G Rennison 92142e5684 Add routing restriction action to make exempt from speed adaptation 2 years ago
Jonathan G Rennison 904ff6757d Add slot support to road vehicles, ships and aircraft 2 years ago
Yourself 7823c81597 Add: Through load speed limit setting 2 years ago
Jonathan G Rennison ba65a5bab5 Run most "daily" vehicle tasks at a fixed frequency at day lengths >= 8
This includes: running costs, track sharing costs, breakdown checks,
servicing checks, order checks
3 years ago
Jonathan G Rennison 5723c317f7 Fix trains with non-front parts needing repair not being serviced 3 years ago
Jonathan G Rennison 3cff5e53e4 Add train cached_curve_speed_mod to VENC, cache checks and debug window 3 years ago
Jonathan G Rennison faf32200cf Merge tag '12.0-beta1' into jgrpp-beta
# Conflicts:
#	CMakeLists.txt
#	bin/ai/CMakeLists.txt
#	bin/game/CMakeLists.txt
#	src/build_vehicle_gui.cpp
#	src/console_cmds.cpp
#	src/core/overflowsafe_type.hpp
#	src/fios.cpp
#	src/lang/english.txt
#	src/lang/german.txt
#	src/lang/korean.txt
#	src/lang/polish.txt
#	src/network/core/game_info.cpp
#	src/network/core/game_info.h
#	src/network/core/tcp_game.cpp
#	src/network/core/tcp_game.h
#	src/network/network.cpp
#	src/network/network_client.cpp
#	src/network/network_client.h
#	src/network/network_coordinator.cpp
#	src/network/network_gui.cpp
#	src/network/network_server.cpp
#	src/network/network_server.h
#	src/newgrf_engine.cpp
#	src/openttd.cpp
#	src/rev.cpp.in
#	src/settings_type.h
#	src/train.h
#	src/train_cmd.cpp
3 years ago
Jonathan G Rennison 2ada5767df Realistic braking: Increase value of RBC_BRAKE_FORCE_PER_LENGTH 3 years ago
Jonathan G Rennison 964ea7b910 Debug: Show realistic braking approach speeds in debug window 3 years ago
Vít Šefl 2183fd4dab
Feature: [NewGRF] Maximum curve speed modifier for rail vehicles (#9346) 3 years ago
Jonathan G Rennison 6a009686c9 Fix #299: Add estimated max speed (full) to template windows 3 years ago
Jonathan G Rennison 502af119e5 Rename and move train max speed estimation functions 3 years ago
Jonathan G Rennison 158608442c Merge pull request #281 from VacuumBreather/train_speed_adaptation
# Conflicts:
#	src/saveload/extended_ver_sl.cpp
#	src/saveload/extended_ver_sl.h
3 years ago
Jonathan G Rennison 62075c88de Apply ATC speed restriction as advisory to prevent instant braking
Remove redundant function
3 years ago
Andreas Schmitt 9a72d741ad Fix weight calculation 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 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
Andreas Schmitt d954c461b0 Add information about vehicle loads and speeds 3 years ago