Commit Graph
789 Commits
Author SHA1 Message Date
glx22andLoïc Guilloux 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 2021-05-29 21:08:25 +02:00
rubidium42andrubidium42 2e136285e1 Codechange: move from C-string to std::string for DoCommand 2021-05-29 19:02:18 +02:00
rubidium42andrubidium42 661728558e Codechange: let IsUnique.* functions accept std::string 2021-05-29 19:02:18 +02:00
rubidium42andrubidium42 b791ffc6de Fix: do not hide parameter by local variable with the same name 2021-05-27 18:30:56 +02:00
rubidium42andrubidium42 44ca7d9377 Change: Use gender-neutral pronouns 2021-05-15 10:16:48 +02:00
glx22andLoïc Guilloux 38c97e1492 Codechange: Replace TILE_AREA_LOOP with range-based for loops 2021-05-13 00:13:54 +02:00
glx22andLoïc Guilloux 2feb801e56 Codechange: Replace FOR_ALL_ROADTRAMTYPES with range-based for loops 2021-05-03 19:46:57 +02:00
Jonathan G RennisonandGitHub ece9a356dc Fix #9113: Assertion failure when removing airport with order backup (#9182) 2021-05-03 15:03:25 +01:00
Peter NelsonandPeterN a3e49178d1 Codechange: Use std::vector for NewGRF station tile sprite layouts. 2021-05-02 17:15:27 +01:00
Peter NelsonandPeterN bd1a20f6ee Codechange: Use std::vector for NewGRF station platform layouts.
This avoids the need to custom memory management and additional members.

This also resolves use-after-free if modifying copied layouts, so presumably nobody has ever done that.
2021-05-02 17:15:27 +01:00
glx22andLoïc Guilloux 9a8756d7ed Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loops 2021-04-29 21:08:24 +02:00
Jonathan G RennisonandCharles Pigott 25909b06d2 Fix #8809: Crash when removing airport when hangar window open 2021-03-07 17:59:38 +00:00
SamuXarickandGitHub a4035af337 Codechange: Apply coding style (#8640)
* Fix: Missing or needed spaces

* Codechange: Remove space

* Codechange: Remove space

* Codechange: More missing spaces

* Codechange: Missing spaces

* Codechange: Remove space

* Codechange: Remove space
2021-02-05 11:00:36 +01:00
Charles PigottandGitHub 9b800a96ed Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
SamuXarickandCharles Pigott 79d938b957 Fix 0125892: Warning about unsigned unary minus 2021-01-07 21:42:10 +00:00
SamuXarickandGitHub f84a466ca5 Fix #7945: Add cost of clearing the sloped tile when placing a dock (#7947) 2021-01-07 10:35:09 +01:00
0125892f04 Fix #8297: Infrastructure counters for road tunnels, bridges, depots … (#8454)
The previous fix 887e9481ff0e70df6bf93ce15a3899a03f124c50 only worked for roads and failed to consider a multiplier used for the infrastructure totals for tunnels/bridges.
Also, depots and bus/truck stops are counted as 2 road pieces on creation but were only counted as 1 road piece on conversion because the function DiagDirToRoadBits() was used, which only ever returns single-piece road segments.

Co-authored-by: A. S <admin-git@sotai.tk>
2020-12-28 22:54:28 +01:00
glx22andCharles Pigott d8605ad18d Codechange: Replace FOR_VEHICLE_ORDERS with range-based for loops 2020-12-27 10:28:46 +00:00
Pavel StupnikovandGitHub 9a45a0f535 Feature: Set exclusive access to industry from GS (#8115) 2020-12-22 14:29:48 +01:00
Michael Lutz 63ccb36ef3 Codechange: Use std::string for most of the user-settable custom names. 2020-05-21 20:02:34 +02:00
dPandCharles Pigott f2a9a1e2a5 Fix #8137: New clients can't join (desync) after funding an industry 2020-05-13 08:43:01 +01:00
dPandCharles Pigott 7bd52970a1 Codechange: Refactor FindStationsAroundTiles to avoid code duplication 2020-05-13 08:43:01 +01:00
glxandNiels Martin Hansen 9339e4dcad Fix #8081: Check for waypoints when removing docking tiles 2020-04-12 08:46:55 +02:00
SamuXarickandGitHub ea7044a74b Fix f5381798: Station::GetTileArea reduced docks to a single tile (#8014) 2020-02-22 15:51:58 +01:00
Niels Martin Hansen 3fcb240f8e Fix d84b67e5: Station rating effects affecting too large area 2020-02-06 16:39:25 +01:00
Jonathan G RennisonandCharles Pigott c3223903ed Codechange: Cache resolved town, station and industry name strings 2020-01-12 19:37:43 +00:00
dPandCharles Pigott 1225693b9c Feature: Improved logic of sharing industry production between 3 or more stations 2020-01-12 14:01:12 +00:00
SamuXarickandCharles Pigott 40605efd1c Codechange: Use KDTree for AirportGetNearestTown (#7424) 2019-12-24 17:37:30 +00:00
glxandNiels Martin Hansen ee7a8eebca Codechange: Replace FOR_ALL_TOWNS with range-based for loops 2019-12-21 20:13:03 +01:00
glxandNiels Martin Hansen d8a1be48cd Codechange: Replace vehicle related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
glxandNiels Martin Hansen 9892d90b26 Codechange: Replace order related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
glxandNiels Martin Hansen ddabfed1cd Codechange: Replace station related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
Jonathan G RennisonandMichael Lutz 35dc377a58 Fix: Infrastructure total update when removing tram road stop
The wrong road owner was used when updating the tram infrastructure total.
This could result in desyncs, negative infrastructure totals, etc.
2019-12-08 15:12:56 +01:00
Niels Martin HansenandGitHub 9900af38f5 Fix #7847: Use ViewportSign coordinates for sign Kdtree coordinates (#7849)
Ensure the same coordinates are used for station/town/player signs regardless of how the landscape changes below it after the coordinates were first determined.

By keeping track of whether each ViewportSign is valid for Kdtree use (and only ever registering the viewport sign when the object is valid) a lot of code can be simplified and become more robust at the same time.
2019-12-01 23:17:33 +01:00
S. D. CloudtandCharles Pigott 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Jonathan G RennisonandMichael Lutz 2be619ea88 Fix #7820: Heap use after free when removing oil rig 2019-11-03 00:39:38 +01:00
Charles Pigott 2f4de0a0fe Fix #7733: Crash when removing a dock next to an industry without a station 2019-10-26 00:35:01 +01:00
JMcKiernandCharles Pigott 04f659e768 Fix: Some typos found using codespell 2019-09-29 21:27:32 +01:00
Daniel LeeandNiels Martin Hansen 2d9eb1c417 Fix #7626: Allow building drive-through stops over one-way/blocked roads owned by towns (instead of crashing). 2019-09-06 23:21:40 +02:00
Juriy PetrochenkovandCharles Pigott f0aea2d246 Fix: RemoveAirport function now returns with 'Aircraft in the way' error message as it should be. 2019-08-13 16:42:22 +01:00
peter1138andNiels Martin Hansen ec2656ab7e Codechange: Restrict docking points of docks. 2019-06-30 16:46:32 +02:00
peter1138andNiels Martin Hansen f538179878 Feature: Multi-tile docks and docking points. 2019-06-30 16:46:32 +02:00
peter1138andPeterN 402e18b460 Change: Allow building road stops over self-owned one-way/blocked road. 2019-05-04 22:39:29 +01:00
Niels Martin Hansen d1ef13fc04 Fix #7481: Just remove oil rig stations right away, don't clean them first 2019-05-03 09:50:01 +02:00
peter1138andMichael Lutz c02ef3e456 Feature: Add NotRoadTypes (NRT) 2019-05-01 21:36:27 +02:00
PeterNandGitHub abe8cf4985 Codechange: Replace duplicated code with TileArea::Expand() (#7467) 2019-04-13 14:12:34 +01:00
Henry WilsonandMichael Lutz 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
kiwitreekorandPeterN bc9b47d2e5 Fix #6222: Advanced sprite layout sometimes showed incorrect railtype ground tile 2019-04-08 18:41:07 +01:00
PeterNandGitHub e1069eee05 Codechange: Check airport layout would fit within map bounds before iterating tiles. (#7429) 2019-03-30 22:20:26 +00:00
PeterNandGitHub b6e3e30d86 Codechange: Distance between town and airport has already just been found, so use it. (#7427)
Previously the distance was thrown away, only to be expensively recalculated again.
2019-03-29 17:43:06 +00:00