Peter Nelson
3ad143c43a
Codechange: Use `x = y` instead of `x{y}` for value-type member initialisation. ( #12501 )
...
This is easier to read and less likely to look like an array definition.
2024-04-15 23:07:36 +01:00
Patric Stout
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
2024-03-16 23:59:32 +01:00
frosch
b1718478c8
Codechange: Replace old non-standard attributes with C++17/20 standard attributes.
2024-02-02 22:29:28 +01:00
Tyler Trahan
2dd2910ab3
Feature: Cheat to fix station ratings at 100% ( #11346 )
2023-10-21 08:35:52 -04:00
Peter Nelson
49dae08a3b
Codechange: Add missing override specifiers.
2023-09-25 21:27:45 +01:00
PeterN
bd150df914
Codechange: Reorder some high-use structs to reduce their size. ( #11201 )
...
This reduces GoodsEntry from 144 to 136 bytes (thereby reducing Station from 9704 bytes to 9192 bytes), and CargoPacket from 40 bytes to 32 bytes.
2023-09-02 20:56:36 +00:00
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
2023-07-19 19:30:14 +02:00
Peter Nelson
56085be9bd
Codechange: Move includes for common STL headers to stdafx.
2023-05-17 10:14:41 +01:00
Jonathan G Rennison
0e4b716815
Fix: O(N^2) cost of Station::RecomputeCatchmentForAll
...
Station::RemoveFromAllNearbyLists does not need to be called when
all station nearby lists have been cleared and are being regenerated.
2023-03-01 16:54:57 +01:00
Jonathan G Rennison
4c1406a4b5
Add: NewGRF road stops
2023-02-26 21:28:30 +01:00
Rubidium
b35c791d05
Codechange: use smart pointers when cloning iterators
2023-01-13 21:09:40 +01:00
dP
36bee83864
Change: Deliver cargo to the closest industry first ( #9536 )
2022-02-19 19:08:23 +01:00
Patric Stout
2c05412d72
Fix #9407 : desync when founding a town nearby a station ( #9526 )
...
"stations_near" wasn't updated when founding a town near
a station. As this variable is not saved, any client joining
after the town is founded has a different value for
"stations_near", potentially causing desyncs.
As the intention of this if() statement was to skip an expensive
calculation when there are clearly no stations, better to move
that check inside the function, so other places also enjoy
the speedup.
2021-08-31 14:31:37 +02:00
Rubidium
930bb22416
Cleanup: remove lines from station_base.h that are already included in includes base_station_base.h
2021-06-17 16:18:30 +02:00
glx22
38c97e1492
Codechange: Replace TILE_AREA_LOOP with range-based for loops
2021-05-13 00:13:54 +02:00
TechGeekNZ
16e5f610f7
Cleanup: Correct typographic errors in code comments.
2020-05-28 08:26:41 +01:00
dP
f2a9a1e2a5
Fix #8137 : New clients can't join (desync) after funding an industry
2020-05-13 08:43:01 +01:00
dP
7bd52970a1
Codechange: Refactor FindStationsAroundTiles to avoid code duplication
2020-05-13 08:43:01 +01:00
glx
ddabfed1cd
Codechange: Replace station related FOR_ALL with range-based for loops
2019-12-21 20:13:03 +01:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
peter1138
f538179878
Feature: Multi-tile docks and docking points.
2019-06-30 16:46:32 +02:00
Charles Pigott
96097b34a5
Codechange: Remove Direction*Byte types
2019-04-29 17:40:22 +01:00
Charles Pigott
119ea7a195
Codechange: Remove StationHadVehicleOfTypeByte type
2019-04-29 17:40:22 +01:00
Niels Martin Hansen
ce10d9be3f
Fix #7374 : Ensure k-d trees are always updated when station sign moves
2019-03-24 19:26:13 +01:00
Henry Wilson
af7d9020a1
Codechange: Use override specifer for overriding member declarations
...
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.
Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
2019-03-24 16:10:04 +01:00
Niels Martin Hansen
d84b67e54d
Codechange: Make a k-d tree index of stations
2019-03-09 20:27:11 +01:00
Peter Nelson
8b1b3fd0f9
Feature: Non-rectangular sparse station catchment area.
2019-03-09 16:33:47 +00:00
peter1138
94b40fd530
Codechange: Convert IndustryVector to a std::set.
2019-03-09 16:33:47 +00:00
PeterN
dd20ccee88
Feature: Industries with neutral stations (e.g. Oil Rig) only supply/accept cargo to/from their neutral station. ( #7234 )
...
This change is a controlled by a game setting, located under Environment ->
Industries which allows toggling the behaviour. It defaults to enabled.
"Company stations can serve industries with attached neutral stations"
When enabled, industries with attached neutral station (such as Oil Rigs) may
also be served by company-owned stations built nearby. This is the traditional
behaviour.
When disabled, these industries may only be served by their neutral station.
Any nearby company-owned stations won't be able to serve them, nor will the
neutral station serve anything else other than the industry.
2019-03-08 18:30:44 +00:00
Juanjo
45ce517105
Codechange: Move some common code after adding/removing tiles to a station to its own function.
2019-02-18 22:57:43 +01:00
Charles Pigott
f5b1115039
Doc: Lots and lots of doxymentation fixes
2018-10-31 12:35:54 +01:00
PeterN
4cebebcf68
Change: Add CargoTypes type for cargo masks. ( #6790 )
2018-05-21 22:08:39 +01:00
frosch
780e595933
(svn r27178) -Fix [FS#5969]: Data race due to lazy initialisation of objects.
2015-03-07 18:27:01 +00:00
fonsinchen
9fdb88962f
(svn r26891) -Codechange: Add methods to retrieve flows from a FlowStatMap
2014-09-21 16:19:52 +00:00
rubidium
134ad63b80
(svn r26753) -Fix: desync due to not always properly restoring game state from the savegame
2014-08-22 17:11:59 +00:00
rubidium
191fd09d32
(svn r26590) -Fix: possible desync (big/little endian) due to not writing complete variables upon saveload
2014-05-16 17:39:35 +00:00
rubidium
0ceb05ee9f
(svn r26582) -Feature-ish: quickly decay cargo after about 21 months of not having picked any of the cargo, and prevent houses and industries providing more cargo
2014-05-11 18:35:34 +00:00
rubidium
89c25b955e
(svn r26580) -Codechange: s/GES_PICKUP/GES_RATING/ (it has nothing to do with actual pickup), s/acceptance_pickup/status/ (the enum isn't called GoodEntryStatus for a reason; it's not only acceptance and pickup anymore)
2014-05-11 18:02:11 +00:00
fonsinchen
ec492bfb77
(svn r26166) -Fix: Scale flows only after mapping to avoid rounding errors.
2013-12-20 14:57:44 +00:00
frosch
db894b0b3f
(svn r26085) -Codechange: Pass ResolverObjects as reference instead of pointer since they are never NULL.
2013-11-24 14:41:19 +00:00
rubidium
b3e93d6520
(svn r26057) -Fix: a number of possibly uninitialised variables
2013-11-23 13:12:19 +00:00
fonsinchen
962d6d7e48
(svn r25963) -Fix [FS#5758]: Mixtures of old and new flows could create cycles.
2013-11-10 15:18:49 +00:00
fonsinchen
6524849386
(svn r25899) -Change: Restrict flows if links are restricted and don't normally pick them anymore.
2013-10-22 16:13:54 +00:00
fonsinchen
e99965aa15
(svn r25896) -Fix: Remove unused and unimplemented declaration of RunAverages.
2013-10-22 16:11:45 +00:00
fonsinchen
9337c561b0
(svn r25892) -Fix: off-by-one error in GetVia prevented certain flows from getting picked
2013-10-20 14:27:36 +00:00
fonsinchen
f0119308f6
(svn r25424) -Fix: keep old flows around in an invalidated state to continue routing cargo if necessary
2013-06-17 20:38:11 +00:00
fonsinchen
741c431caa
(svn r25362) -Feature: consider cargo waiting at other stations for rating at the origin station
2013-06-09 13:04:32 +00:00
fonsinchen
db671ffb86
(svn r25346) -Codechange: Glue between stations and flow stats
2013-06-09 12:49:47 +00:00
fonsinchen
c8f068d979
(svn r25345) -Add: implementation of SharesMap and FlowStatMap
2013-06-09 12:48:42 +00:00
rubidium
3947453277
(svn r25259) -Codechange: track capacities and usage of links
2013-05-19 14:22:04 +00:00