Age | Commit message (Collapse) | Author |
|
use INVALID_VEHICLE instead of nonsense INVALID_SLOT.
|
|
add consts, reduce indentation level by short-circuit logic, convert if cascades to switch, whitespace, bracing, plus some minor stuff
|
|
|
|
vehicle orders by something remotly comprehensible
|
|
- 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
|
|
newgrf_engine.[ch], and add the new files to project files.
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
due to not being able to build a vehicle. Triggered when cloning a retired design
|
|
operation while overtaking in a curve (tnx to guru3, Tron and peter1138)
-Codechange: while at that, removed a local variable (more pretty :))
|
|
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
|
|
|
|
|
|
blocks to allow use of Random() instead of InteractiveRandom(), which will alleviate some possible network desyncs.
|
|
Revisions in detail: 2542, 3226 (partial), 3229, 3231, 3232, 3238, 3242-3245, 3251, 3253, 3260, 3263, 3265, 3266, 3269, 3277, 3278, 3279, 3283 (partial), 3304, 3305, 3306
|
|
|
|
|
|
-Add: added several hooks (event-callbacks) for road-related-stuff
|
|
unnecessary use of pointers and using the *BIT() macros.
|
|
avoiding function declarations in .c files and unnecessary indirection
|
|
- CHANCE*() instead of mumbling strange numbers
|
|
|
|
when nothing was changed
due to the FOR_ALL_VEHICLES(), redrawing those windows are slow
|
|
line 378
running MaybeReplaceVehicle() is now delayed until after the loop in CallVehicleTicks()
This avoids selling the vehicle the loop currently works with (and continues to work with afterwards)
|
|
this var works like _new_train_id and the rest of that kind of vars, except it is set each time a vehicle is build, nomatter what type
this is a nice tool to code vehicle independent code, which in turn can reduce code duplication
Right now it's used in ReplaceVehicle() and CmdCloneVehicle()
|
|
this is a complete rewrite, that makes use of existing commands like build and sell
this means that multiheaded train engines are replaced correctly
|
|
vehicles using the cargo type and not a magic engine number
|
|
- const, whitespace, indentation, bracing, GB/SB, pointless casts
- use the trinary operator where appropriate
- data types (uint[] -> AcceptedCargo, ...)
- if cascade -> switch
- if (ptr) -> if (ptr != NULL)
- DeMorgan's Law
- Fix some comments
- 0 -> '\0', change magic numbers to symbolic constants
|
|
|
|
proper types or just removing them
|
|
plus some related changes (mostly casts)
|
|
references to our (new) original engine/vehicle tables.
|
|
strings more explicit
|
|
inconsistencies while trying to locate bug 1244167
|
|
|
|
|
|
|
|
signed/unsigned warnings
|
|
|
|
in my fix was way too high. Also only lock a slot for 5 days instead of 30.
|
|
off????
- Also simplified/optimized the code.
- Now it uses manhattan distance as an approximation instead of actual distance to find the distance. Much faster.
|
|
structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
|
|
multiple trains within the same signal block, provided their paths dont intersect. For this the block must have all exit and entry signals be pbs signals. Place these by ctrl-clicking 4 times on a normal signal.
- Feature: [pbs] Implement autoplacement of pbs blocks, when a block has an entry and an exit pbs signal, covert the entire block to pbs. Can be turned off in the patch settings.
- Feature: [pbs] Allow showing of reserved status by making the tracks darker, when the pbs debug level is at least 1.
|
|
funciton IsCompatibleRail().
- Codechange: [NPF] Check the railtype along a route against the engine type instead of against the previouse tile. This clears the way for electriefied rails.
- Add: [NPF] [ 1209644 ] A penalty for crossings (peter1138)
|
|
|
|
|