tron
2bd2f75de2
(svn r3796) When unmagicfying code, do it Right(tm) and also give the variables sensible names. I flipped a 'b' and a 'd' in r3785
2006-03-08 19:47:18 +00:00
tron
463cf2ec6b
(svn r3795) Add a function to request the orientation of a depot
2006-03-08 15:29:23 +00:00
tron
2181a72e9e
(svn r3787) Use DirToDiagDir() instead of >> 1
2006-03-08 08:28:48 +00:00
tron
03536a32a1
(svn r3786) More work for DirDiff
2006-03-08 08:16:31 +00:00
tron
8b447de24c
(svn r3785) Replace some if-magic to determine the turning direction for road vehicles with the new DirDiff stuff
2006-03-08 07:50:26 +00:00
tron
fbe939b31f
(svn r3783) Replace further ints and magic numbers by Direction, DiagDirection and friends
2006-03-08 06:55:33 +00:00
tron
2d3c28f2b3
(svn r3776) Replace many ints and magic numbers by Direction, DiagDirection and friends
2006-03-06 20:28:28 +00:00
tron
cc4f5b4e6f
(svn r3763) Adapt to the new 'map accessors go in foo_map.h'-scheme
2006-03-05 10:19:33 +00:00
tron
87fdb129d2
(svn r3758) Remove the news validation callback. It is superseded by r3757.
2006-03-04 11:15:44 +00:00
tron
4270026b42
(svn r3757) -Feature: Delete news items about vehicles, when they get stale
...
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
2006-03-04 11:01:35 +00:00
tron
006444a0dc
(svn r3754) Miscellaneous changes: indentation, reduce variable scope, constness, avoid some more function pointer casts
2006-03-03 22:21:29 +00:00
tron
62f5386d91
(svn r3752) FYOS avoid to cast function pointers
2006-03-03 21:29:13 +00:00
tron
c91a2e0f26
(svn r3751) -Fix: Correctly implement minimum search, so road vehicles head twoards the closest station, not the last one in the list
2006-03-03 21:18:19 +00:00
tron
08720b6fd7
(svn r3750) Use INVALID_STATION instead of -1 in NPF
2006-03-03 20:54:54 +00:00
celestar
9d54e51ef9
(svn r3730) Multistop modifications:
...
-Codechange: Completely rewritten the slot assignment system. It now consumes less CPU cycles and memory
-Codechange: Increased maximum number of roadstops to 16.
-Fix: Several conditions where a slot becomes unliked from a vehicle
-Codechange: ClearSlot now only takes one parameter, the vehicle
-Feature: Console command 'clearslots' to clear ALL currently assinged slots. debug usage only
-Feature: vehicles that cannot get a slot now wait on the road instead of planlessly blocking stops or circling around
-Codechange: Adjusted debug levels
TODO: Make the slot finder compatible with (a) pathfinder(s).
2006-03-02 08:55:12 +00:00
peter1138
23b13d3f42
(svn r3681) - [Multistop] Check the RoadStop type before check its status. This fixes an assert introduced in r3663. Also fix the return type of GetRoadStopType().
2006-02-27 19:43:19 +00:00
peter1138
af5a1d49c0
(svn r3663) - Fix: [Multistop] Check the status of the destination road stop instead of a station's first road stop. This only has effect with road vehicle queuing disabled.
2006-02-24 17:52:07 +00:00
tron
df156dacb2
(svn r3658) Add functions and symbolic names to retrieve road tile types and road pieces
2006-02-23 08:20:28 +00:00
tron
35fb17947a
(svn r3643) Remove a local variable which is just a pointer to a road stop status field and had the sensible name 'b'; instead directly use the road stop status field
2006-02-21 06:43:53 +00:00
tron
49c7eb934b
(svn r3613) Some more const, indentation, whitespace and similar stuff
2006-02-18 14:41:24 +00:00
peter1138
6cfefdb275
(svn r3612) - RoadStop->slot[] stores a vehicle index. Adjust its type and use INVALID_VEHICLE instead of nonsense INVALID_SLOT.
2006-02-18 14:11:23 +00:00
tron
ea73b46684
(svn r3597) Miscellaneous (I like that word) changes: Fix some indentation, add consts, reduce indentation level by short-circuit logic, convert if cascades to switch, whitespace, bracing, plus some minor stuff
2006-02-13 21:15:00 +00:00
peter1138
efe76c22e6
(svn r3589) - Rename u.road.unk2 to u.road.blocked_ctr
2006-02-11 10:45:20 +00:00
tron
784801f930
(svn r3584) Replace the rather obscure control flow for handling road vehicle orders by something remotly comprehensible
2006-02-10 06:03:51 +00:00
tron
453b30e387
(svn r3564) Several smaller changes:
...
- 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
2006-02-06 09:18:04 +00:00
peter1138
b88904f345
(svn r3524) - Split newgrf features from engine.[ch] into newgrf_engine.[ch], and add the new files to project files.
2006-02-03 12:55:21 +00:00
peter1138
2b98509692
(svn r3513) Fix strange typo in last commit ...
2006-02-01 09:11:31 +00:00
peter1138
80952253c2
(svn r3512) Yet more whitespace fixes (mostly by Rubidium)
2006-02-01 09:08:25 +00:00
tron
84fb96fe85
(svn r3511) More whitespace ([FS#46] by Rubidium)
2006-02-01 07:36:15 +00:00
tron
22dc05faf2
(svn r3510) Fiddle with whitespace and parentheses
2006-02-01 06:32:03 +00:00
tron
c8dd64bdbc
(svn r3489) Remove an unused declaration
2006-01-30 16:58:05 +00:00
Darkvater
4e09974975
(svn r3472) - [PBS] Remove from trunk. Anyone interested can still find it 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.
2006-01-29 18:57:26 +00:00
bjarni
b87b5f1187
(svn r3402) -Fix: [building/cloning] added a string telling if build failed due to not being able to build a vehicle. Triggered when cloning a retired design
2006-01-18 14:12:26 +00:00
truelight
b23ffe4045
(svn r3371) -Fix: don't allow road-vehicles to perform an out-of-bound operation while overtaking in a curve (tnx to guru3, Tron and peter1138)
...
-Codechange: while at that, removed a local variable (more pretty :))
2006-01-06 17:25:39 +00:00
tron
af70b49bf7
(svn r3367) Unify the 4 distinct 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
2006-01-05 21:35:54 +00:00
tron
e272b03fee
(svn r3365) Staticise 36 functions
2006-01-05 12:40:50 +00:00
tron
5353d05865
(svn r3358) Remove another piece of unused code
2005-12-30 22:09:01 +00:00
peter1138
1ffc700797
(svn r3352) - NewGRF: Move initialization of vehicle random_bits to DC_EXEC blocks to allow use of Random() instead of InteractiveRandom(), which will alleviate some possible network desyncs.
2005-12-28 22:29:59 +00:00
tron
b06b3e2ca2
(svn r3313) Remove GPMI related changes from trunk
...
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
2005-12-18 12:10:46 +00:00
truelight
531073bea0
(svn r3305) -Rename: Changed all instances of ottd_ related to the AI to ttai_
2005-12-14 15:54:23 +00:00
tron
bf98086de8
(svn r3298) Remove unused and write-only variables
2005-12-14 06:28:48 +00:00
truelight
8733f49e88
(svn r3232) -Add: implemented the event-system for AIs
...
-Add: added several hooks (event-callbacks) for road-related-stuff
2005-11-23 15:08:29 +00:00
peter1138
3e702afc08
(svn r3213) - Codechange: Clean up handling of road stops, avoiding unnecessary use of pointers and using the *BIT() macros.
2005-11-17 10:12:21 +00:00
tron
8cebe2f607
(svn r3204) Make handling of clicking on vehicles a bit less ugly by avoiding function declarations in .c files and unnecessary indirection
2005-11-16 12:52:01 +00:00
tron
5fa6b7eb06
(svn r3179) - RandomRange() and RandomTile() instead of home brewed versions
...
- CHANCE*() instead of mumbling strange numbers
2005-11-14 09:21:05 +00:00
tron
ee15e3de13
(svn r3172) static, const
2005-11-13 13:43:55 +00:00
bjarni
5e278b7ec3
(svn r3156) -Fix: removed some cases where autoreplace windows were redrawn when nothing was changed
...
due to the FOR_ALL_VEHICLES(), redrawing those windows are slow
2005-11-08 23:18:09 +00:00
bjarni
682b9ee8e4
(svn r3111) -Fix: [autoreplace] [ 1341783 ] Assertion failure in vehicle.c 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)
2005-10-31 12:59:47 +00:00
bjarni
6d41c23cf2
(svn r3101) -Codechange: added _new_vehicle_id
...
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()
2005-10-29 21:54:28 +00:00
bjarni
bf467bd99c
(svn r3081) -Codechange: [autoreplace] complete rewrite of autoreplace
...
this is a complete rewrite, that makes use of existing commands like build and sell
this means that multiheaded train engines are replaced correctly
2005-10-24 19:40:48 +00:00