Age | Commit message (Collapse) | Author |
|
|
|
IsTunnel(), which just checks for a tunnel, but not the tile type as IsTunnelTile() does
|
|
codes instead of using this global variable
|
|
Direction to DiagDirection as that's what it really operates on
|
|
|
|
|
|
|
|
|
|
DiagDirection and friends
|
|
|
|
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
|
|
remove global variable to return data as we can now access this directly.
|
|
add consts, reduce indentation level by short-circuit logic, convert if cascades to switch, whitespace, bracing, plus some minor stuff
|
|
than one per vehicle type.
|
|
|
|
like r3584
|
|
index, so use INVALID_ENGINE.
|
|
necessary, as this is far faster than brute forcing it later.
|
|
- Don't treat non-booleans as booleans
- Reduce variable scope
- Bracing
- Use DeMorgan's law to make conditionals easier to read
- if cascade -> switch
- Replace some magic numbers by symbolic names
- Avoid assignments within other statements
|
|
engines will use them
|
|
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
|
|
newgrf_engine.[ch], and add the new files to project files.
|
|
|
|
|
|
18 and 19 didn't init the multiheaded engine pointers
|
|
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.
|
|
certain conditions.
|
|
turn around before it reaches the tile end (same as a normal end of line.) This fixes a bug whereby the engine could poke into the depot and crash with another engine just leaving it.
|
|
front and rear engines are no longer saved
instead the pointers are generated on load
|
|
due to not being able to build a vehicle. Triggered when cloning a retired design
|
|
- Only count the parts from the source train that will be moved, not the whole train.
- Don't count articulated parts of an engine. This alleviates issues with autoreplacing very long trains.
|
|
class. Also fix typo in r3384.
|
|
long train
|
|
loading instead
of speed, and get that state from first vehicle in a train consist.
|
|
drag and drop
|
|
disapearing, and a depot which was unable to remove
|
|
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
|
|
|
|
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.
|
|
|
|
|
|
engine type directly instead of getting it from a vehicle. This allows the function to be used before vehicles are involved.
|
|
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
|
|
avoiding function declarations in .c files and unnecessary indirection
|
|
-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
|