frosch
0e36260337
(svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability.
2009-09-13 19:15:59 +00:00
rubidium
a79be4de27
(svn r17363) -Fix [FS#3163] (r16717): feed autoreplace the front of vehicles, otherwise it gets distracted and bails out
2009-09-01 21:54:59 +00:00
rubidium
99d46e0ad7
(svn r17248) -Fix: add GPL license notice where appropriate
2009-08-21 20:21:05 +00:00
frosch
0ddf9c86e1
(svn r17209) -Codechange: Move cargo_type from (Rail|Road|Ship)VehicleInfo to EngineInfo.
2009-08-17 18:33:48 +00:00
smatz
df4dbfec23
(svn r17091) -Fix (r17089)(r17090): regression test was right
2009-08-06 17:35:20 +00:00
smatz
1fcdb149d3
(svn r17089) -Codechange: move RunVehicleDayProc() to vehicle.cpp
2009-08-06 17:02:49 +00:00
smatz
096aca2479
(svn r17085) -Codechange: unify the place where vehicle's cargo ages
2009-08-06 12:44:10 +00:00
smatz
4a39f236fa
(svn r17084) -Codechange: _age_cargo_skip_counter is common to all vehicle types
2009-08-06 12:33:13 +00:00
rubidium
5bb7b8ad35
(svn r17062) -Change: unify the naming of some 125 strings
2009-08-04 18:04:33 +00:00
rubidium
04ee98df52
(svn r16920) -Codechange: shuffle some strings around to simplify looking up vehicle type specific strings for a specific message
2009-07-22 20:17:07 +00:00
rubidium
49fcb20a91
(svn r16919) -Codechange: unify some more StringID w.r.t. their naming
2009-07-22 19:12:20 +00:00
rubidium
9eaee690bc
(svn r16908) -Codechange: s/DepotWaypointReservation/DepotReservation/
2009-07-22 08:52:41 +00:00
frosch
fec6129cd1
(svn r16894) -Codechange: Add [Specialised]Vehicle::Last().
2009-07-20 19:58:33 +00:00
smatz
8718babe90
(svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get()
2009-07-16 19:00:13 +00:00
smatz
64de470917
(svn r16814) -Codechange: make IsNormalAircraft() member of Aircraft
2009-07-13 16:37:27 +00:00
smatz
98b8479f56
(svn r16813) -Codechange: make IsEngineCountable() member of Vehicle
2009-07-13 16:35:22 +00:00
rubidium
5fe30de455
(svn r16801) -Fix [FS#3022]: cargo payments weren't destroyed when a vehicle was destructed. This only happened when you crashed a vehicle while it was unloading.
2009-07-13 09:15:11 +00:00
rubidium
f97bd41ed4
(svn r16721) -Codechange: make Is/SetRoadVehicleFront, Is/Set/HasArticulatedPart member of RoadVehicle.
2009-07-02 08:59:27 +00:00
smatz
1e1f0ab2cf
(svn r16719) -Codechange: make IsArticulatedPart(), IsTrainEngine(), IsTrainWagon(), IsMultiheaded(), EngineHasArticPart() and IsRearDualheaded() members of Train
2009-07-01 23:57:20 +00:00
smatz
20fedeb3d6
(svn r16717) -Codechange: make IsFrontEngine() member of Train
2009-07-01 22:22:01 +00:00
rubidium
4f99508114
(svn r16694) -Fix [FS#2995] (rgradual loading, rnewindustries): only pay for whatever has been actually unloaded and perform the payment when unloading has finished. This fixes, amongst others:
...
* cheating by starting to unload and after getting paid rushing to the depot to get sold (or unloading, loading and getting paid again for the remainder)
* cargo being dropped onto a station at the moment a stockpiling industry doesn't accept it anymore
* industries getting cargo that has not been unloaded yet and subsequently dumping it back on the station in one go
Note: you will now get paid after the unloading has finished, so you'll have to wait a bit longer for 'your' money.
2009-06-29 19:55:36 +00:00
smatz
f6a4d61cca
(svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile()
2009-06-24 17:39:54 +00:00
smatz
d2ad6d38be
(svn r16544) -Codechange: use double-linked list for vehicle position caches in order to improve performance (~5% with many vehicles)
2009-06-09 17:20:06 +00:00
smatz
af85994f7f
(svn r16527) -Codechange: use static member functions instead of simple casts when converting Vehicle to specialised vehicle types. Includes safety check
2009-06-06 16:54:22 +00:00
frosch
289e8a7f45
(svn r16525) -Codechange: Notify small ufos on deletion of road vehicles, so they can head for somewhere else instead of stumbling over a ghost.
2009-06-06 14:46:50 +00:00
alberth
580e478e4e
(svn r16491) -Codechange: Added parentheses around bitwise operators for code style.
2009-06-01 11:43:36 +00:00
rubidium
f540a86f95
(svn r16477) -Fix [FS#2936] (r12650): loading indicator when 'unload' in and 'no loading' is off was pointing to the wrong direction.
2009-05-31 11:04:56 +00:00
smatz
11d88765cc
(svn r16472) -Codechange: set vehicle type in SpecializedVehicle constructor instead of constructor of each vehicle type
2009-05-30 20:13:12 +00:00
smatz
fa4f521e82
(svn r16451) -Fix (r16449): crash when a spectator (or dedicated server) received news about new engine
2009-05-27 19:37:27 +00:00
yexo
f044ad6f80
(svn r16439) -Change: Make the default vehicle servicing settings company-based settings, so in a multiplayer game everyone can change them.
2009-05-26 21:59:49 +00:00
rubidium
d39f442bd0
(svn r16434) -Cleanup: remove some dead code; primarily stuff that can't be reached like break after returns or break after functions that never return (i.e. NOT_REACHED)
2009-05-26 15:46:24 +00:00
rubidium
2832d69272
(svn r16422) -Codechange: use const_cast for removing const and warn when const is (accidentally?) removed using C-style casts.
2009-05-24 21:09:00 +00:00
rubidium
c496a3e014
(svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it.
2009-05-24 20:29:04 +00:00
frosch
eeb3f75cfe
(svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted.
2009-05-24 16:52:42 +00:00
frosch
6e06e82bc4
(svn r16414) -Change: Make it harder to ignore/close important error messages. Esp. do not close them automatically after some time.
2009-05-24 12:50:58 +00:00
rubidium
6cfc38b97c
(svn r16397) -Codechange: move GetVehicleOrder/GetLastVehicleOrder into Vehicle
2009-05-23 12:27:42 +00:00
rubidium
cd382b28a3
(svn r16394) -Codechange: move (NewGRF) cache variables into a separate struct so (some vehicle related) NewGRF cache 'desyncs' can be tested easier.
2009-05-23 09:10:56 +00:00
rubidium
4c0542c17f
(svn r16393) -Codechange: move VehicleRail to Train.
2009-05-22 22:55:41 +00:00
rubidium
6350648a6c
(svn r16392) -Codechange: move some variables (the ones that aren't caches) from VehicleRail to Train
2009-05-22 22:33:05 +00:00
rubidium
1324100d69
(svn r16391) -Codechange: use Train instead of Vehicle where appropriate.
2009-05-22 22:22:46 +00:00
rubidium
489253b630
(svn r16390) -Codechange: move u.road to RoadVehicle.
2009-05-22 20:22:20 +00:00
rubidium
1ceb349779
(svn r16389) -Codechange: use RoadVehicle instead of Vehicle where appropriate
2009-05-22 20:18:45 +00:00
rubidium
4ae19b7451
(svn r16388) -Codechange: move u.air to Aircraft
2009-05-22 20:07:26 +00:00
rubidium
1e853b1226
(svn r16387) -Codechange: use Aircraft instead of Vehicle where appropriate
2009-05-22 20:03:26 +00:00
rubidium
86fc432293
(svn r16382) -Codechange: make GetVehicleTrackdir a member function of Vehicle.
2009-05-22 18:17:20 +00:00
smatz
50624d5c0f
(svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved
2009-05-22 15:13:50 +00:00
smatz
70d3ed15c8
(svn r16376) -Codechange: Vehicle::Tick() now returns false if the vehicle was deleted
2009-05-22 13:53:14 +00:00
smatz
6636ed7589
(svn r16354) -Codechange: use 'new' pool accessors and methods for Engine too
2009-05-18 19:32:16 +00:00
smatz
0c10daa243
(svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index)
2009-05-17 01:00:56 +00:00
smatz
d495dc5dbc
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
2009-05-16 23:34:14 +00:00
yexo
d489f93473
(svn r16315) -Codechange: move the autorenew settings to a new CompanySettings struct
2009-05-15 23:55:06 +00:00
smatz
c189a15e3e
(svn r16302) -Codechange: remove Vehicle::AllocateList
2009-05-13 21:38:23 +00:00
smatz
09d16b4106
(svn r16299) -Fix (r16242): don't use DoCommandP when the function can be called from another command
2009-05-13 19:13:36 +00:00
rubidium
9777d0cfd6
(svn r16291) -Fix [FS#2893]: RVs were unable to find a depot when turning around (in some cases), causing 'nearest depot' orders to be occasionally lost.
2009-05-13 10:58:41 +00:00
frosch
8bb92c110d
(svn r16260) -Codechange: Add Vehicle::IncrementOrderIndex() to deduplicate some code.
2009-05-09 13:37:18 +00:00
rubidium
241af768f0
(svn r16242) -Codechange: rework pausing
...
-Fix [FS#2864]: autopause and manual pausing conflict with eachother
-Fix: new game + pause on new game + autopause make the game not unpause on the first join
2009-05-06 15:06:57 +00:00
frosch
f1347ded2b
(svn r16240) -Fix: Make 'stop in depot'-orders only apply on the target depot, not those which are entered on the way to them.
2009-05-06 13:15:07 +00:00
frosch
c95bbdc6c1
(svn r16228) -Fix/Change (r16187): If we are heading for a different depot, do also not do the refitting-part of the depot-order.
...
-Fix (r16198): && != &, GetDepotOrderType != GetDepotActionType and - uhm - ODATFB_NEAREST_DEPOT is not set for current_order either.
2009-05-04 19:27:22 +00:00
frosch
cf0bc6e649
(svn r16198) -Fix/Change (r16187): 'Go to nearest depot'-orders are fulfilled when reaching any depot, even though the train decided for a different depot on the last junction/order-skip.
2009-05-01 23:16:52 +00:00
rubidium
b5f7583472
(svn r16187) -Fix [FS#2871]: do mark the "go to depot X" order fulfilled when reaching any depot, but only when reaching depot X.
2009-04-29 21:12:30 +00:00
smatz
cc6955ce47
(svn r16178) -Fix [FS#2866]: don't try to reserve path for trains crashed in station
2009-04-27 15:10:15 +00:00
rubidium
5c5b357043
(svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible.
2009-04-21 23:40:56 +00:00
rubidium
e0e9a1b02e
(svn r16114) -Cleanup: unify some more strings and remove some more unused strings
2009-04-21 20:20:53 +00:00
rubidium
51288dee9d
(svn r16079) -Fix [FS#2824]: insanely fast trains would not stop in time for stations
...
-Fix: insanely fast trains would sometimes 'jump' over waypoints/via stations within a tick, which would cause the order not to be processed causing the train to go in loops until (with luck) it 'hit' the tile
2009-04-18 13:43:05 +00:00
rubidium
fc1607a763
(svn r16048) -Fix/Feature-ish [FS#2740]: don't warn that crashed vehicles are getting old; upgrading them is impossible (racetrack)
2009-04-12 19:28:05 +00:00
rubidium
c3e87f345d
(svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too
2009-03-15 00:32:18 +00:00
rubidium
f3e0fd7416
(svn r15711) -Codechange: lots of whitespace cleanup/fixes
2009-03-14 18:16:29 +00:00
smatz
4c6afbbbe2
(svn r15704) -Cleanup: remove further includes from recently split files
2009-03-13 23:48:07 +00:00
frosch
d86e821f53
(svn r15701) -Fix [FS#2595]: Blame NewGRFs returning inconsistent information in purchase-list/after building before users have a chance to blame OpenTTD for incorrectly autorenewing/-replacing.
2009-03-13 21:28:40 +00:00
rubidium
473c210368
(svn r15699) -Codechange: split Cmd* from vehicle.cpp to vehicle_cmd.cpp.
2009-03-13 20:09:35 +00:00
rubidium
bc11c9e5a5
(svn r15681) -Cleanup: remove unneeded forward declaration.
2009-03-12 11:04:41 +00:00
rubidium
b003536ea8
(svn r15676) -Codechange: remove the need for BeginVehicleMove and merge VehiclePositionChanged and EndVehicleMove.
2009-03-11 20:43:14 +00:00
rubidium
9d0c77b123
(svn r15672) -Codechange: (left,right,top,bottom)_coord -> coord.(left,right,top,bottom), i.e. use Rect.
2009-03-11 17:26:58 +00:00
michi_cc
80133f67ea
(svn r15652) -Fix [FS#2706]: new (this) is seldom a good idea as destructors of member variables aren't run causing memory leaks.
2009-03-09 18:41:54 +00:00
smatz
488b7e6bf6
(svn r15624) -Fix (r15621): warning about comparing signed and unsigned integer types
2009-03-05 22:55:47 +00:00
peter1138
85569a4559
(svn r15622) -Codechange: Duplication.
2009-03-05 17:52:35 +00:00
peter1138
c50730d57b
(svn r15621) -Feature: When cloning a vehicle with a custom name, add and/or increment a number at the end of name and assign it to the new vehicle (for emma)
2009-03-05 17:37:56 +00:00
smatz
1f42f44092
(svn r15569) -Codechange: replace MallocT + memset( 0 ) calls by CallocT
2009-02-24 21:32:23 +00:00
frosch
abe4692da2
(svn r15541) -Revert (r15399): 'v->cargo_type' is also used in other places, which cannot accept CT_INVALID.
...
-Codechange: Add Engine::GetDefaultCargoType() and Engine::CanCarryCargo() and use them.
-Fix [FS#2617]: When articulated parts have no available default cargo, use the cargo type of the first part for livery selection.
-Change: To decide whether a vehicle is refittable do not test its current capacity for being zero, but always use the 'capacity property'.
Note: The property is used unmodifed without calling CB 15/36. By setting it to a non-zero value and returning zero in the callback vehicles can be refitted to/from zero capacity for e.g. livery effects.
Note: It is intentional that you cannot control refittability by CB 36.
2009-02-21 12:52:41 +00:00
frosch
8aab3b09f5
(svn r15517) -Fix [FS#2642](r6455): Wagonoverrides and articulated engine parts use the colour scheme of the engine, but not its recolour callback, nor its 2CC flag. Same applies to roadvehicles.
2009-02-18 20:40:24 +00:00
rubidium
5c8cf85613
(svn r15434) -Codechange: bit of type safety for the DC_xxx flags.
2009-02-09 21:20:05 +00:00
rubidium
89e1afdaa0
(svn r15428) -Codechange: consistently use colour instead of having both color and colour.
2009-02-09 02:57:15 +00:00
rubidium
a49197f522
(svn r15336) -Fix: do not use _current_company in the GUI as there are no guarantees that _current_company is the same as _local_company.
2009-02-04 16:45:07 +00:00
smatz
c50d947784
(svn r15318) -Fix [FS#2594](r10288): don't warn about non-primary engines getting old
2009-02-02 16:49:11 +00:00
smatz
9021c20b5e
(svn r15299) -Cleanup: remove many redundant includes
2009-01-31 20:16:06 +00:00
smatz
ca45774160
(svn r15077) -Codechange: enumify DAYS_IN_YEAR and DAYS_IN_LEAP_YEAR
...
-Change: when computing daily running cost, divide by 365 (instead of 364). Since r12134, the rounding errors don't need this correction anymore
2009-01-13 22:58:03 +00:00
truebrain
c2406cd42d
(svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
...
NoAI is an API (a framework) to build your own AIs in. See:
http://wiki.openttd.org/wiki/index.php/AI:Main_Page
With many thanks to:
- glx and Rubidium for their syncing, feedback and hard work
- Yexo for his feedback, patches, and AIs which tested the system very deep
- Morloth for his feedback and patches
- TJIP for hosting a challenge which kept NoAI on track
- All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
2009-01-12 17:11:45 +00:00
rubidium
c305a35e45
(svn r14990) -Codechange: handle articulated RVs and trams more strictly in GetStationTileForVehicle and CanVehicleUseStation (based on idea by Swallow)
2009-01-11 14:09:09 +00:00
smatz
c5db2ea181
(svn r14958) -Codechange [FS#1923]: when checking for unique names, compare only with manually set names
...
There are situations that aren't solvable (because of different language files), so if the user really wants to have duplicated name, allow him to do so. It solves desyncs between server and clients using different languages. It behaves the same in SP and MP, so users won't see the different behaviour as a bug (and even checking in SP could be worked around by the user).
2009-01-10 15:54:07 +00:00
rubidium
0543f50181
(svn r14952) -Codechange: unify the "can vehicle go to station" tests
2009-01-10 09:51:14 +00:00
rubidium
28ea38ae55
(svn r14949) -Cleanup: pointer coding style
2009-01-10 00:31:47 +00:00
rubidium
c0e7434f38
(svn r14944) -Cleanup: add spaces around some operators
2009-01-09 22:56:28 +00:00
rubidium
d197060137
(svn r14933) -Codechange: check the whether a pool item can be constructed instead of trying to make it and check for NULL.
2009-01-09 14:59:02 +00:00
frosch
eec8c04586
(svn r14925) -Fix [FS#2500]: Abort dragging of vehicles in the group window when they are deleted.
2009-01-08 21:16:19 +00:00
smatz
ec7ebf2170
(svn r14835) -Change: apply the 'warn if train's income is negative' setting to other vehicle types, too
2009-01-04 18:34:23 +00:00
smatz
b1f7ef7076
(svn r14831) -Codechange: use {VEHICLE} instead of Train/Ship/Road veh/Aircraft/{STRING} {COMMA} in lang files (part by Swallow)
2009-01-04 17:42:46 +00:00
smatz
91233ea596
(svn r14828) -Codechange: move most of save/load-specific code to separate files
2009-01-04 15:32:25 +00:00
rubidium
f316796629
(svn r14803) -Codechange: move order list management into it's own class and remove the order count from the savegame as we can easily count that (PhilSophus)
2009-01-03 13:52:06 +00:00
rubidium
d91baac764
(svn r14785) -Fix [FS#2132]: vehicle list for station gets closed when station view is closed even when the vehicle list is stickied. Other vehicle lists are not deleted when their 'opening' window gets closed so do the same with the station view.
2009-01-02 20:59:04 +00:00
rubidium
e83cca7d13
(svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter.
2008-12-28 14:37:19 +00:00