Commit Graph

91 Commits

Author SHA1 Message Date
rubidium
4db98357ea (svn r17552) -Codechange: rename load_unload_time_rem to something more generic as it's used for more than just load/unload. Also add some documentation about where it is used. 2009-09-15 20:58:44 +00:00
rubidium
99d46e0ad7 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
frosch
32a47df09a (svn r17121) -Fix [FS#3060]: Update vehicle position cache when the vehicle sprite changes. 2009-08-08 18:45:12 +00:00
smatz
1fcdb149d3 (svn r17089) -Codechange: move RunVehicleDayProc() to vehicle.cpp 2009-08-06 17:02:49 +00:00
frosch
fec6129cd1 (svn r16894) -Codechange: Add [Specialised]Vehicle::Last(). 2009-07-20 19:58:33 +00:00
smatz
98b8479f56 (svn r16813) -Codechange: make IsEngineCountable() member of Vehicle 2009-07-13 16:35:22 +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
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
rubidium
d7eb9f9d0e (svn r16505) -Fix [FS#2951] (r16472): since g++ 4.4 the implicit (default) constructor will zero the whole class. This caused all vehicle indices to be 0, which causes all kinds of trouble. 2009-06-02 19:12:28 +00:00
frosch
6e06b592ad (svn r16480) -Fix (r15617): Invalidate newgrf variable caches of more vehicles in more places. Esp. they were only invalidated for trains. 2009-05-31 12:03:14 +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
01e5c536a7 (svn r16445) -Codechange: update old comments (Yexo) 2009-05-26 23:24:34 +00:00
smatz
e419fe6d3f (svn r16442) -Codechange: use new Vehicle accessors at more places 2009-05-26 22:45:48 +00:00
smatz
0c53f04c07 (svn r16441) -Codechange: new class SpecializedVehicle used as superclass for all vehicle types 2009-05-26 22:10:13 +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
4ae19b7451 (svn r16388) -Codechange: move u.air to Aircraft 2009-05-22 20:07:26 +00:00
rubidium
d40c61749f (svn r16385) -Codechange: move u.disaster to DisasterVehicle. 2009-05-22 18:57:11 +00:00
rubidium
521c265282 (svn r16384) -Codechange: move u.effect to EffectVehicle 2009-05-22 18:56:25 +00:00
rubidium
86fc432293 (svn r16382) -Codechange: make GetVehicleTrackdir a member function of Vehicle. 2009-05-22 18:17:20 +00:00
smatz
3793b966c3 (svn r16380) -Codechange: rename pool.hpp to pool_type.hpp 2009-05-22 15:39:22 +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
7eb14aa49f (svn r16377) -Codechange: unify FOR_ALL_* macros, use separate index variable instead of var->index 2009-05-22 14:23:36 +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
rubidium
1cc82de384 (svn r16333) -Cleanup: remove a bunch of unused wrapper functions. 2009-05-17 11:18:34 +00:00
smatz
0c10daa243 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 2009-05-17 01:00:56 +00:00
smatz
cf986c3099 (svn r16326) -Codechange: replace GetPoolItemPoolSize() by PoolItem::GetPoolSize() 2009-05-16 23:44:36 +00:00
smatz
d495dc5dbc (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 2009-05-16 23:34:14 +00:00
smatz
c189a15e3e (svn r16302) -Codechange: remove Vehicle::AllocateList 2009-05-13 21:38:23 +00:00
frosch
d1aa2286ec (svn r16261) -Fix (r16260): Replace a space with a newline and a tab. (thanks smatz) 2009-05-09 14:23:19 +00:00
frosch
8bb92c110d (svn r16260) -Codechange: Add Vehicle::IncrementOrderIndex() to deduplicate some code. 2009-05-09 13:37:18 +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
rubidium
b9aa5e17f2 (svn r15617) -Change [FS#2694]: vehicle variables 40-43 weren't cached (though spec stated they are). Caching these variables can yield a 10+% speed increase when those vehicle variables are queried often. 2009-03-04 23:32:23 +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
20cb3a581c (svn r15354) -Fix (r14803): first shared of a vehicle could be NULL making it impossible to (share-)clone the vehicle. 2009-02-05 15:58:42 +00:00
frosch
61a893d6fd (svn r15308) -Codechange: Deduplicate km-ish/h -> mph conversions. 2009-02-01 17:14:39 +00:00
smatz
f0ff90d71c (svn r15216) -Feature: native support for Transport Tycoon (Original) savegames. Based on SVXConverter's source code and documentation by Roman Vetter 2009-01-23 02:35:17 +00:00
rubidium
28ea38ae55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +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
abd3b8e0d7 (svn r14801) -Codechange: don't reference Vehicle::num_orders directly but through a method GetNumOrders() (PhilSophus) 2009-01-03 13:20:32 +00:00
smatz
9c2c1dea06 (svn r14753) -Fix (r1): after buying a company, one could have more vehicles with the same UnitID 2008-12-26 23:53:07 +00:00
rubidium
047e40d33f (svn r14745) -Codechange: move "depot_list" and "leave_depot_immediately" out of the vehicle struct (saving up to 16 bytes per vehicle) as it is only used to tell a calling function entered a depot (for autoreplace). 2008-12-26 18:26:11 +00:00
frosch
f1e02ab1ed (svn r14702) -Documentation: Add a note about the meaning and validity of Vehicle::dest_tile. 2008-12-20 11:51:52 +00:00