peter1138
ea59cc4a26
(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
2f8e3dcc05
(svn r3658) Add functions and symbolic names to retrieve road tile types and road pieces
2006-02-23 08:20:28 +00:00
tron
661bad9032
(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
7692556c62
(svn r3613) Some more const, indentation, whitespace and similar stuff
2006-02-18 14:41:24 +00:00
peter1138
95ce125633
(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
5352e9fbcb
(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
30429dc4fb
(svn r3589) - Rename u.road.unk2 to u.road.blocked_ctr
2006-02-11 10:45:20 +00:00
tron
c60b3216ae
(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
087fe86ed2
(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
6c28b1cec7
(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
2a71cd9dcf
(svn r3513) Fix strange typo in last commit ...
2006-02-01 09:11:31 +00:00
peter1138
49e51cf27f
(svn r3512) Yet more whitespace fixes (mostly by Rubidium)
2006-02-01 09:08:25 +00:00
tron
1c3e8630fe
(svn r3511) More whitespace ([FS#46] by Rubidium)
2006-02-01 07:36:15 +00:00
tron
9712d6f639
(svn r3510) Fiddle with whitespace and parentheses
2006-02-01 06:32:03 +00:00
tron
ec74a57ada
(svn r3489) Remove an unused declaration
2006-01-30 16:58:05 +00:00
Darkvater
4014e36aec
(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
2b31f5fe7e
(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
6b7d0a2641
(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
2053685fb5
(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
318fe153eb
(svn r3365) Staticise 36 functions
2006-01-05 12:40:50 +00:00
tron
2cfdfb5d96
(svn r3358) Remove another piece of unused code
2005-12-30 22:09:01 +00:00
peter1138
901068fd6e
(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
d5aa95b87e
(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
6ca528ec82
(svn r3305) -Rename: Changed all instances of ottd_ related to the AI to ttai_
2005-12-14 15:54:23 +00:00
tron
a2533d5ee6
(svn r3298) Remove unused and write-only variables
2005-12-14 06:28:48 +00:00
truelight
8315736569
(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
2a9d325930
(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
d09db07ca1
(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
6509e42db3
(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
81e5b16d71
(svn r3172) static, const
2005-11-13 13:43:55 +00:00
bjarni
1b3e626ff9
(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
fa5ca040e9
(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
17d341b902
(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
0f5c8787f8
(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
tron
355d834c6e
(svn r3079) Determine the type of the "first arrival" message for road vehicles using the cargo type and not a magic engine number
2005-10-23 14:38:09 +00:00
tron
181d586a7c
(svn r3078) Some more stuff, which piled up:
...
- 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
2005-10-23 13:04:44 +00:00
tron
39f5dbfd3b
(svn r3019) -Codechange: Replace explicit shifting/anding/oring with GB and SB
2005-10-05 07:20:26 +00:00
tron
6d7c7e67b2
(svn r3010) Get rid of quite some dubious casts, either by using GB(), proper types or just removing them
2005-10-03 21:20:01 +00:00
tron
0ad3902acf
(svn r3003) Change int, uint, uin16 and byte to EngineID where appropriate, plus some related changes (mostly casts)
2005-10-01 12:43:34 +00:00
peter1138
9e20ae4222
(svn r2990) Remove _engine_original_sprites and replace all uses with references to our (new) original engine/vehicle tables.
2005-09-26 19:01:49 +00:00
tron
2ae758a32b
(svn r2780) Remove some more unused strings and make the use of a few strings more explicit
2005-08-01 13:01:14 +00:00
celestar
1e67dfffe7
(svn r2732) -Codechange: Cleaned the order flags some more. Hit some inconsistencies while trying to locate bug 1244167
2005-07-28 06:09:15 +00:00
tron
647cbd6bdd
(svn r2701) Insert Id tags into all source files
2005-07-24 14:12:37 +00:00
tron
54cbd01825
(svn r2673) Include functions.h directly, not globally via openttd.h
2005-07-22 07:02:20 +00:00
tron
6ad3895306
(svn r2660) Get rid of some more shifting/anding/casting
2005-07-21 06:31:02 +00:00
Darkvater
5261529887
(svn r2617) - Fix: fix some warnings, and reenable vs.net2003 signed/unsigned warnings
2005-07-17 18:11:17 +00:00
ludde
8257102045
(svn r2604) Fix: removed unused variable
2005-07-17 13:46:42 +00:00
ludde
05dc6ecebc
(svn r2603) Fix [multistop] Fix problem with multistop handling, the range in my fix was way too high. Also only lock a slot for 5 days instead of 30.
2005-07-17 13:45:43 +00:00
ludde
d4e0c72867
(svn r2599) Fix: Road vehicle multistop handling used NPF even if NPF was off????
...
- Also simplified/optimized the code.
- Now it uses manhattan distance as an approximation instead of actual distance to find the distance. Much faster.
2005-07-17 12:29:33 +00:00
tron
a4bf608d40
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
2005-07-13 18:04:01 +00:00