Compacting 3 booleans into 3 bits could save memory allocation, however this data is inside a union which also contains a 4-byte integer. As such this gives the cost penalty of a bit-field without any benefit.
This breaks #7729 which specifically allows autoreplace of same engine types, and also did not work properly if the engine had been built during the current game session.
Invalid NewGRFs could set up an engine variant loop that never ends. This
was checked for in some places that evaluated variants, but not all. In
most cases this would result in the engines not appearing, but could
potentially cause an infinite loop and crash.
Instead, during NewGRF initialization detect loops and remove invalid
variants before setting display flags.
No longer you can utilize the free (and instant) labour of station
workers, transporting your cargo from one part of the station to
the other. No more!
Based on patch by dP.
(cherry picked from commit df400ef84a)
For vehicle packets they shouldn't be compared, and for station
packets they are already in a bucket per next_station.
(cherry picked from commit 1243c331b6)
During b0e73277 we removed loaded_at_xy, but I kinda forgot that
it was a union with next_station. Now next_station wasn't copied
anymore, or checked in AreMergable.
(cherry picked from commit e6c02ebee6)
Over the years, things got reused and changed, making the current
names somewhat unclear in what they actually mean and do.
(cherry picked from commit 30172fc037)
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.
(cherry picked from commit bd150df914)
It was TileOrStationID, most likely to make sure both types in
the union are identical. But as TileIndex is a StrongTypeDef
that becomes a bit weird. So instead, still make sure they are
of equal size, but define their individual types better.
(cherry picked from commit c9c9cfa4fd)
This stores three flags in unused map bits, and avoids having to look up
station graphics and custom station specs to determine blocked/wires/pylons
status.
This potentially affects rail pathfinding performance.
Savegame version is not bumped, as the flags can just be updated every
time.
(cherry picked from commit cb658e6cc6e1c114c1eaafaaa5b14849f04ca083)
This stores three flags in unused map bits, and avoids having to look up
station graphics and custom station specs to determine blocked/wires/pylons
status.
This potentially affects rail pathfinding performance.
Savegame version is not bumped, as the flags can just be updated every
time.