Age | Commit message (Collapse) | Author |
|
coding style (and rest of the code).
|
|
|
|
|
|
This major feature-fix keeps track of the value of transfers offloaded at a station, and hands on to a loading vehicle a credit note proportionate to the cargo loaded. The transferring vehicle is paid only for the distance it has travelled. eg. B-C in a transfer chain A-B-C-D.
When the final cargo is delivered, these credit notes are cashed, and the final vehicle is paid for A-D minus any credit notes it is carrying. The company bank balance increases by the value of the A-D route.
You still need to set up a profitable route; it is still easy to make a loss on transfers by bad planning. :)
|
|
be used for more than just the gradual loading status.
|
|
Change the signature of GetNewVehiclePos():
-void GetNewVehiclePos(const Vehicle *v, GetNewVehiclePosResult *gp);
+GetNewVehiclePosResult GetNewVehiclePos(const Vehicle *v);
|
|
Most (i.e. 13 of 15) callers of GetNewVehiclePos() do not care for the return and the others can figure it out by inspecting the information returned in struct GetNewVehiclePosResult.
Therefore remove the return value.
|
|
mapping is now dealt with only in NewGRF code, on load where possible.
|
|
tables with dynamically generated data. Change associated code to use new functions.
|
|
Remove {,u}intswap() and replace them by Swap()
|
|
Cloning were unaware that articulated locomotives could refit without refitting the front unit
|
|
and assert the vehicle type in that function. Not a critical error, but it does increase game performance by up to 10% when playing a large game (many vehicles) with aircraft/road vehicle newgrfs loaded.
|
|
work of mart3p.
|
|
removal of some (by now) redundant comments.
|
|
road vehicles with enums. Original patch by mart3p.
|
|
|
|
|
|
VEH_Train is 0, VEH_Road is 1 and so on
This means that "v->type" can be used as array indexes instead of VehTypeToIndex() (or "v->type - VEH_Train/0x10 as the code still used in some places)
Surprisingly this can be done without changing the savegame format
|
|
autoreplace window
-The user will notice the following changes:
All vehicle types behaves in the same way
Adding/removing an engine (new design and so on) can no longer result in the window selecting a new engine
All valid replacements will be displayed since it looks at refitting options as well (this solves the missing ships with the newships GRF)
Since you can't replace an engine into itself, the engine selected in the left list will no longer appear in the right list
-The code changes:
Instead of looping all engines all the time, each list generates a list like the build windows
This ensures consistent list generation since only one function can loop all engines
Unified code for all vehicle types
It now use the lists to call the drawing code in the build vehicle window
Works on selected EngineIDs instead of selected index in the list
|
|
gets flooded and there is a vehicle on the bridge. Original patch by KeeperofTheSoul.
|
|
paid for, so that cargo cannot be paid for more than once.
|
|
flags of RailVehInfo, as well as changing the code to reflect the fact that it was not a flag but rather a one value only variable. Doing so, some evaluations have been simplified.
-Codechange: Add and use RAILVEH_SINGLEHEAD when railveh_type is set to 0, which was implicit before.
-Cleanup: Remove some extraneous parenthesis.
|
|
loading the game. This can solve crashes when a game is loaded with missing GRF's
|
|
helicopter and remove some magic numbers related to the subtype.
|
|
magic numbers and add a function IsNormalAircraft() which tells us whether the aircraft is in fact some flying device or a rotor/shadow.
|
|
-Regression (r8314): I only did half the necessary changes to move railtype from Engine to RailVehicleInfo. Now do the rest.
|
|
code (duplicated code removal)
|
|
real static inline functions
|
|
-Codechange: Move the railtype from EngineInfo to RailVehicleInfo, because having a railtype for non-rail vehicles isn't that useful
|
|
uint16
-Fix: CmdMassStartStopVehicle() tried to put a TileIndex into an uint16
Those two bugs were unrelated to each other and unrelated to r8295, even though that commit touched the code in question
|
|
depot_airport_index for GenerateVehicleSortList() and BuildVehicleList() into one uint16 argument
It turned out that all 3 arguments were the same at all the places those functions are called, so there was no point in having more than one
|
|
fail to reset prev_shared and next_shared
-As a result, vehicles in the game could end up having prev/next pointers to vehicles, that was no longer in the game
|
|
colour map
selection.
|
|
the cached vehicle weight for trains properly. This caused (in network games) the server to have a different cached vehicle weight than newly joined clients would have, which causes desyncs.
|
|
reset correctly
While it's not certain if this would have any serious sideeffects (or any at all), it's reset when intended now
|
|
excessive payment any longer, as the origin TILE is now stored as long as the origin STATION for the transported cargos. Basically this is only a temporary fix until cargopackets are implemented, but it fixes one of the oldest known bugs (Special Thanks to Darkvater for lots of testing)
|
|
values.
This lets us increase the sprite width from 14 to up to 29 bits,
effectively nulling the old sprite limit. Table changes in next commit.
|
|
OT_LOADING and OT_LEAVESTATION) replaced by v->BeginLoading() and v->LeaveStation() calls. This should allow easy hooking of those state transitions in order to maintain vehicle loading queue.
|
|
pointer to allocated memory instead of modifying the pointer given as parameter
|
|
stillunknown and pv2b.
|
|
renamed to .cpp)
|