Commit Graph

232 Commits

Author SHA1 Message Date
frosch cade383f9b (svn r27579) -Change [FS#6402]: Performance improvement for dedicated servers by skipping drawing calls earlier in the process. (JGR) 2016-05-22 11:30:25 +00:00
rubidium 9e0f4b3847 (svn r26864) -Codechange: bring a bit more OO into the disaster vehicles 2014-09-20 15:46:44 +00:00
rubidium 6c2abf0930 (svn r26863) -Codechange: move a number of Vehicle* functions into the Vehicle class 2014-09-20 15:31:26 +00:00
frosch c30e137685 (svn r26747) -Feature: [NewGRF] Advanced visual effects with multiple effect sprites independent of spawning model. 2014-08-17 14:53:11 +00:00
frosch 17e88d644a (svn r26746) -Codechange: Separate enums for visual effect type and spawning model. 2014-08-17 14:52:48 +00:00
frosch e0d69933f6 (svn r26157) -Feature: [NewGRF] Vehicle variable 4D for determining the position within an articulated vehicle. 2013-12-13 20:21:04 +00:00
fonsinchen 6e1cc80926 (svn r25903) -Codechange: Refactor RefreshNextHopsStats into an own class LinkRefresher. 2013-10-22 18:34:10 +00:00
fonsinchen 54db96be43 (svn r25891) -Feature: Use smallstack to allow for multiple next hops when loading and unloading. 2013-10-20 13:47:58 +00:00
fonsinchen 338d9861bc (svn r25883) -Fix: Limit recursion and branching in RefreshNextHopsStats more aggressively. 2013-10-19 13:17:06 +00:00
fonsinchen 5e017b8000 (svn r25737) -Codechange: move inner workings of RefreshNextHopsStats into separate function 2013-08-20 21:22:37 +00:00
fonsinchen b09c4043ec (svn r25565) -Codechange: Rewrite order prediction logic to introduce proper refit prediction 2013-07-06 17:01:31 +00:00
fonsinchen 04e3eb6fab (svn r25361) -Feature: distribute cargo according to plan given by linkgraph 2013-06-09 13:03:48 +00:00
rubidium 3947453277 (svn r25259) -Codechange: track capacities and usage of links 2013-05-19 14:22:04 +00:00
rubidium cdb0a76958 (svn r25012) -Codechange: persistently keep 'reserved' cargo (for full-load improved loading) instead of calculating if for every cycle 2013-02-17 14:54:50 +00:00
rubidium ced17303c2 (svn r24998) -Fix [FS#5137]: Set vehicle's service interval is percent flag appropriately on creation (peter1138) 2013-02-14 17:24:55 +00:00
rubidium 369a6f9d1b (svn r24995) -Codechange: Add flags to vehicle service interval for custom & ispercent (peter1138) 2013-02-14 17:06:49 +00:00
rubidium c77cd1f409 (svn r24994) -Codechange: Replace access to service_interval with accessors (peter1138) 2013-02-14 17:04:01 +00:00
frosch 38f265c083 (svn r24528) -Fix: [NewGRF] RandomAction 84 should interpret register 100 as signed. 2012-09-16 16:31:53 +00:00
frosch 9527bad3a7 (svn r24446) -Add [FS#5199]: Store more consist properties in order backups. 2012-07-29 16:48:00 +00:00
frosch 48e0d9901f (svn r24443) -Codechange: Move Vehicle::name to BaseConsist. 2012-07-29 16:45:11 +00:00
frosch 4c9f65800b (svn r24442) -Codechange: Split some members of Vehicle into a new class BaseConsist. 2012-07-29 16:44:39 +00:00
frosch 08a8c3a773 (svn r24384) -Fix [FS#5188-ish]: Make IsInDepot() functions behave consistent across vehicle types and add IsChainInDepot instead, if that is what shall be checked. 2012-07-07 15:39:46 +00:00
michi_cc ce5c936b07 (svn r24246) -Add [FS#5052-ish]: [NewGRF] Variable with the current max speed for vehicles. 2012-05-14 19:56:49 +00:00
michi_cc 6a70abbd99 (svn r24136) -Feature [FS#4465]: Autoreplace vehicles only when they get old. (Vikthor) 2012-04-17 19:44:02 +00:00
truebrain 091bc25a90 (svn r23714) -Codechange: don't mix Viewport with non-viewport code 2012-01-02 13:44:37 +00:00
truebrain 0d929e877f (svn r23713) -Codechange: split VehicleMove() into two functions, to minimalize the work done where possible 2012-01-02 13:44:30 +00:00
truebrain 19004a77f8 (svn r23712) -Codechange: rename the two vehicle hashes we have to names that make clear where they differ in 2012-01-02 12:07:50 +00:00
alberth 4af8c2d5e1 (svn r23704) -Doc: Doxygen comment fixes and additions. 2012-01-01 17:22:32 +00:00
truebrain 1c9bec1999 (svn r23640) -Fix: stop using FORCEINLINE (1/3rd of the instances were, the others were still regular inline), but make sure inline is always a 'forced' inline (I am looking at you MSVC) 2011-12-20 17:57:56 +00:00
rubidium eaadd215be (svn r23594) -Codechange: follow coding style with multi line comments 2011-12-19 17:40:54 +00:00
smatz 33d283fdb1 (svn r23588) -Codechange: use the 'final' keyword so compiler can optimise out some indirect calls 2011-12-18 17:17:18 +00:00
frosch 44dc83b73f (svn r23502) -Fix (r23143): Vehicle var 42 used a cargo translation table of the wrong GRF. 2011-12-12 19:30:36 +00:00
michi_cc 4d2a9e384c (svn r23290) -Fix [FS#2379,FS#3569]: Change the centre of train vehicles to depend on the vehicle length instead of being fixed at 4/8th of the original vehicle length to make sure shortened vehicles don't block tiles they shouldn't block. 2011-11-21 20:51:43 +00:00
rubidium f01b3e2721 (svn r23104) -Codechange: prepare the vehicle/sign z for some further changes to reduce casting 2011-11-04 11:09:06 +00:00
frosch bbc3409942 (svn r23080) -Feature: [NewGRF] Use variable 10 to enable vehicle GRFs to draw different sprites on the map and in various GUIs. 2011-11-01 16:51:47 +00:00
frosch acc3c75951 (svn r23075) -Codechange: Add GetGRF() and GetGRFID() methods to Engine and Vehicle to simplify code. 2011-11-01 00:23:41 +00:00
frosch 72cd855978 (svn r23074) -Codechange: Add Vehicle::GetEngine() to simplify code. 2011-11-01 00:21:08 +00:00
michi_cc 3cb1dcf31c (svn r22997) -Feature: [NewGRF] Allow access to other vehicles in the vehicle chain in VarAction 2. 2011-10-04 21:35:29 +00:00
frosch 2188383658 (svn r22947) -Fix: [NewGRF] Do not call CB 32 for disaster, effect vehicles or aircraft shadows/rotors. 2011-09-19 19:23:23 +00:00
michi_cc 08b7981f37 (svn r22713) -Feature: [NewGRF] Per vehicle custom cargo ageing period. 2011-08-03 20:55:08 +00:00
planetmaker 43c8cd1d5e (svn r22473) -Codechange: Automatic orders are better called implicit orders as no real order influencing path finding is added 2011-05-18 12:19:58 +00:00
alberth 28092366ec (svn r22459) -Doc: Typo fixes and doxygen markup improvements. 2011-05-14 18:35:40 +00:00
frosch aedd38255b (svn r22327) -Add: Vehicle::GetGroundVehicleFlags() for accessing GroundVehicle<>::gv_flags through a Vehicle struct. 2011-04-16 16:41:02 +00:00
alberth 0ebc548a89 (svn r21938) -Codechange: AfterLoadGame() is no longer friend of Vehicle. 2011-02-01 21:18:27 +00:00
frosch a97d52a29a (svn r21933) -Codechange: Split cur_order_index into cur_auto_order_index and cur_real_order_index to keep track of the current real order in an unambiguous way.
-Fix [FS#4440]: Automatic orders behave now stable wrt. service orders and are not added or removed depending on the need of servicing.
-Fix: Various other issues with automatic orders, e.g. vehicles getting stuck with "no orders" when there are automatic orders at the end of the order list.
2011-01-31 20:44:15 +00:00
rubidium 67a5cd0b18 (svn r21932) -Document: some tidbits related to vehicles 2011-01-31 20:27:33 +00:00
alberth da0b09557c (svn r21930) -Codechange: Remove unused vehicle GetTypeString() functions. 2011-01-30 21:32:21 +00:00
alberth eea2f90da7 (svn r21925) -Doc: Doxygen additions and markup corrections to vehicle-related functions. 2011-01-29 21:37:11 +00:00
terkhen 50b0e10026 (svn r21923) -Codechange: Unify articulated vehicle iteration functions. 2011-01-29 17:27:32 +00:00
terkhen 9626e0bf2b (svn r21922) -Codechange: Unify articulated vehicle checking functions. 2011-01-29 17:26:23 +00:00
terkhen 23ffef05ce (svn r21921) -Codechange: Move GroundVehicleSubtypeFlags as they will be needed by some Vehicle functions. 2011-01-29 17:21:39 +00:00
rubidium 7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 2011-01-22 14:52:20 +00:00
smatz 6dc24cf643 (svn r21876) -Codechange: typedef SpecializedVehicleBase and GroundVehicleBase to reduce typing 2011-01-21 14:43:38 +00:00
rubidium d89095b3ec (svn r21843) -Codechange: move documentation towards the code to make it more likely to be updates [t-z]. 2011-01-18 21:58:22 +00:00
rubidium bc9afec3b0 (svn r21807) -Codechange: split automatic order removal into a separate function (fonsinchen) 2011-01-15 18:14:29 +00:00
peter1138 3408814169 (svn r21709) -Fix (r8128): Vehicle sprite was cached into a 16 bit variable, causing incorrect sprites to be displayed. 2011-01-04 12:04:09 +00:00
rubidium 28f16a732f (svn r21644) -Change: keep showing "No orders" when the order list is filled with only automatic orders 2010-12-26 13:25:34 +00:00
rubidium 64f04c3a74 (svn r21642) -Feature: concept of automatic station orders; add stub orders for intermediate stations and remove them when not visiting them anymore. This allows you to see what trains visit a station without actually having to order a vehicle to stop at all stations. Based on patch by fonsinchen 2010-12-26 09:03:19 +00:00
terkhen a4a9274177 (svn r21519) -Codechange: Allow direct access to the GroundVehicleCache from a Vehicle. 2010-12-14 21:31:00 +00:00
terkhen 79e2b3153d (svn r21516) -Codechange: Add IsGroundVehicle function to the Vehicle class. 2010-12-14 21:26:03 +00:00
rubidium 6d831906a3 (svn r21508) -Codechange: move the code to handle the pathfinder's "path found" status to a separate function 2010-12-13 21:55:06 +00:00
rubidium 49a77e89c4 (svn r21504) -Codechange: move the "lost" bit from the train's flags to vehicle flags 2010-12-13 21:52:39 +00:00
rubidium 23369337c1 (svn r21466) -Codechange: make VehicleHasDepotOrders a function of Vehicle. 2010-12-11 13:48:30 +00:00
rubidium b46e57d364 (svn r21338) -Fix [FS#4272]: bogus cache mismatch warnings with desync debugging because some cache was invalidated but never reset 2010-11-27 21:09:41 +00:00
rubidium 46186134c8 (svn r21239) -Codechange/Fix: [NewGRF] Use 0xFF instead of 0 as default value for visual effect. This makes setting train prop 22 to 0 actually work (Hirundo) 2010-11-18 14:20:03 +00:00
rubidium 9af570eab4 (svn r21237) -Codechange: Move HandleLocomotiveSmokeCloud to Vehicle::ShowVisualEffect (Hirundo) 2010-11-18 14:15:27 +00:00
rubidium b9407f7ca0 (svn r21235) -Codechange: Move Train::UpdateVisualEffect to the Vehicle class (Hirundo) 2010-11-18 14:09:39 +00:00
rubidium f4689f4301 (svn r21233) -Codechange: Introduce an enum to remove some magic numbers from the visual effect code (Hirundo) 2010-11-18 14:04:36 +00:00
rubidium 79c47ef8b0 (svn r21232) -Codechange: Move cached_vis_effect from the TrainCache to the VehicleCache (Hirundo) 2010-11-18 14:03:12 +00:00
terkhen 6a38925ca3 (svn r21123) -Codechange: Remove max_speed from the Vehicle class. 2010-11-09 17:43:05 +00:00
terkhen c8a56f17f8 (svn r21097) -Codechange: Unify cached max speed for all vehicle types. 2010-11-06 12:53:31 +00:00
terkhen d699c4a345 (svn r21091) -Codechange: Add bit constants for checking NewGRFCache validity. 2010-11-06 12:39:18 +00:00
terkhen 8eb3d653da (svn r21090) -Codechange: Rename VehicleCache to NewGRFCache. 2010-11-06 12:37:55 +00:00
alberth fa13971337 (svn r21088) -Doc: Additions/corrections of doxygen comments. 2010-11-05 16:34:22 +00:00
alberth 5e3991e20e (svn r21087) -Doc: Align and make existing comments available for doxygen. 2010-11-05 15:48:30 +00:00
rubidium 2fb18e975c (svn r20645) -Codechange [FS#4086]: unify the code for checking for breakdown handling as well (Hirundo) 2010-08-28 14:14:37 +00:00
rubidium 702cc96943 (svn r20644) -Codechange [FS#4086]: unify the vehicle breakdown code (Hirundo) 2010-08-28 14:01:50 +00:00
rubidium 1fa98e1695 (svn r20574) -Codechange: a little over 1 million vehicles should be enough for the forseeable future 2010-08-19 20:58:30 +00:00
rubidium 38ca44594f (svn r20539) -Codechange: make order backups more self-contained. 2010-08-18 15:15:59 +00:00
michi_cc a994c1ef71 (svn r20506) -Change: Vehicles will now stop loading after a load cycle that loaded less than possible, unless it's a full load order. This should improve behaviour with gradual loading and cargo continuously trickling in. 2010-08-15 22:37:30 +00:00
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
frosch a7d168b2e5 (svn r20079) -Codechange [FS#3922]: Add helper functions to deal with the 192-256-magic of vehicle movement. 2010-07-04 13:07:47 +00:00
smatz 00a52cc475 (svn r19756) -Codechange: move UpdateViewport() from Vehicle to SpecializedVehicle in order to improve performance 2010-05-03 23:36:17 +00:00
frosch ec9ac775bf (svn r18929) -Fix [FS#3568]: Preserve some timetable related vehicle flags during autorenew/-replace. 2010-01-27 20:07:29 +00:00
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
rubidium e4af35d316 (svn r18764) -Fix [FS#3422]: split the (un)load ticks counter and signal wait counter; sometimes they might get into eachother's way 2010-01-09 14:43:08 +00:00
rubidium 19fa38601d (svn r18402) -Codechange: unify/centralise the code for crashing vehicles 2009-12-04 20:29:46 +00:00
rubidium 2e2f72b971 (svn r18342) -Fix: erroneous spaces before ; 2009-11-29 19:20:39 +00:00
frosch f97daed5ef (svn r18297) -Fix: Preserve timetable-start when auto-replacing/-renewing. 2009-11-26 14:56:17 +00:00
rubidium a951c505bf (svn r18292) -Codechange: add a command to set the start date of a timetable. Based on work by PhilSophus. 2009-11-25 23:37:15 +00:00
rubidium 2e766884f6 (svn r17795) -Codechange: split cargolist into one for vehicles and one for stations. 2009-10-18 13:39:00 +00:00
rubidium af457fc9fe (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 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
frosch efcaefd178 (svn r17121) -Fix [FS#3060]: Update vehicle position cache when the vehicle sprite changes. 2009-08-08 18:45:12 +00:00
smatz 88a2d688da (svn r17089) -Codechange: move RunVehicleDayProc() to vehicle.cpp 2009-08-06 17:02:49 +00:00
frosch d5a4c89365 (svn r16894) -Codechange: Add [Specialised]Vehicle::Last(). 2009-07-20 19:58:33 +00:00
smatz 868c21cbcc (svn r16813) -Codechange: make IsEngineCountable() member of Vehicle 2009-07-13 16:35:22 +00:00
rubidium 985608c713 (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 249b6e6798 (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 0c10006907 (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