Age | Commit message (Collapse) | Author |
|
|
|
|
|
DiagDirection and friends
|
|
This is used to delete
- all news about a vehicle, when it gets deleted
- "vehicle has stopped in depot" news, when it gets started
- "vehicle has invalid orders" news, when the orders get changed
|
|
because the name suggests it does the former and current behavior broke in some places in very subtle ways (for example HASBIT(x, 0) != HASBIT(y, 1) doesn't work, returning a bool after HASBIT(x, 9) neither)
|
|
them. Currently the second colour is fixed to be the player's colour.
|
|
and document the remaining definitions
|
|
SL_MAX_VERSION
|
|
function call for drawing of vehicles.
|
|
vehicle array (merge the two together to avoid confusion)
|
|
|
|
|
|
index, so use INVALID_ENGINE.
|
|
faulty cache warning message, and noticably speeds up depot operations in large games.
|
|
"giving Darkvater credit for the last three".
|
|
is required. Instead a list of used/unused numbers is created and the first unused number is chosen. This significantly improves performance in large games.
|
|
head separately before updating images, as v->first is used extensively in GetTrainImage() for custom graphics. This gives a significant speed improvement on loading a game.
|
|
currently ALL available wagons are displayed in the right menu in the replace window
however the replacement will only be done if the new wagon can be refitted to carry same cargo as the old one is currently carrying
Since the standard vehicles do not have any valid wagon replacements, this feature can only be used when using newgrf sets
|
|
|
|
|
|
tile, the height difference can be 8
|
|
|
|
them anymore at all, return the extra space. Since Bjarni's fix for this was abominable, the weird situation arises of 2 NULL structs of free space, of which the first isn't usable.
|
|
in branch/pbs. This reverts revisions r3158, r3140, r3075, r2977, r2674, r2625, r2621, r2529, r2528, r2525, r2524, r2519, r2517, r2516, r2507, r2499. (in conjunction with Tron)
- The only change is that the nsignalsw.grf file is kept and that existing nightlies with PBS signals get those signals converted to combo-signals.
|
|
under bridge. This was caused by a wrong tile-occupancy testing where it was assumed that a vehicle's height is only a multitude of 8 (a single height-difference). This is incorrect as a vehicle on a slope will assume all height levels between the lower-and upper-bounds. The crash is still possible as seen in the Flyspray bugreport but this has a different cause.
|
|
front and rear engines are no longer saved
instead the pointers are generated on load
|
|
- Change fixed array per player to a single pool. This avoids future problems
with vehicle numbers and decreases savegame size. Engine replacements from
previous savegames will be lost.
- Move engine replacement code from players.c to engine.c.
(thanks to blathijs for rewriting this)
|
|
attach the cars if the front engine was replaced
and the front engine was multiheaded and the first vehicle after it was the rear part of that engine
|
|
CMD_CHANGE_{AIRCRAFT,ROADVEH,SHIP,TRAIN}_SERVICE_INT commands into one CMD_CHANGE_SERVICE_INT command.
As side effect this is a
-Fix: The default AI tried to change the service intervals of vehicles via the CMD_CHANGE_TRAIN_SERVICE_INT command - regardless of the type of the vehicle - which of course failed for non-trains
|
|
|
|
- move call to convert from old to new train subtypes.
- ensure AI is started for AI players.
|
|
starting removal process.
|
|
trains: Use the length of the train before the replacement as reference length
|
|
blocks to allow use of Random() instead of InteractiveRandom(), which will alleviate some possible network desyncs.
|
|
|
|
|
|
|
|
it to the new vehicle. Fixes "[ 1370039 ] Autoreplaced vehicles lose their names"
|
|
engine type directly instead of getting it from a vehicle. This allows the function to be used before vehicles are involved.
|
|
replacement code.
|
|
'major' version to just: version.
|
|
without any cars (introduced in r3220)
|
|
to the train instead of just the new engine
This applies to wagon removal during autoreplace too
|
|
command to make half multiheaded engines
|
|
This means that any user attempt to remove a rear engine will tell the user to move the front engine instead
This fixes the assert when moving multiheaded engines (introduced in r3144)
Note: to make old savegames use this feature, some engines might be turned around in order to link engines in pairs
-Codechange: train subtype is now a bitmask
This allows fast access to info like if it is a wagon or engine and if it is in front and so on
Note: savegame version bump
|
|
GetRearEngine(), because it's the engine type of the vehicle which gets passed as first parameter
|
|
|
|
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
|
|
|
|
Also align short cases nicely
|