Commit Graph

354 Commits (58db962353cfb87ef4571462e6d0656781939edd)

Author SHA1 Message Date
frosch 67db5087cd (svn r14406) -Fix [FS#Eddi]: Autoreplace did not work for vehicles in free wagon chains. 16 years ago
smatz 6987e6015a (svn r14395) -Fix [FS#2285]: crashes and GUI desyncs when order is deleted/modified while the timetable window is open
-Fix: close any dropdown and child windows in the Order and Timetable windows when selected order is deselected, deleted, ...
16 years ago
rubidium 7ef5406946 (svn r14371) -Fix [FS#2313]: loading indicator didn't stay with the front engine when turning a train in a station. 16 years ago
frosch 2bf182fb36 (svn r14369) -Fix: Enforce non-front engines to be stopped.
This could be caused by old savegames resp. their conversion, and causes
trouble for e.g. autoreplace.
16 years ago
smatz 192d348f78 (svn r14343) -Fix [FS#2300]: invalid v->u.air.targetairport could cause crashes at several places when the station pool got smaller 16 years ago
smatz 5f4ff33ce3 (svn r14337) -Codechange: use CmdRename* and CMD_RENAME_* for vehicle, president and company renaming commands, too 16 years ago
smatz 1266b1a73f (svn r14334) -Feature: ability to reset name to default/automatic value (for vehicles, engines, towns, groups, stations, waypoints, managers and companies) 16 years ago
rubidium 7c8a50d7d8 (svn r14324) -Fix [FS#2241]: free any blocks that a helicopter may have on an oilrig when the helicopter gets forcefully removed (bankruptcy). For other airports this isn't needed as they can't be used by multiple companies. 16 years ago
michi_cc fa3f2ae035 (svn r14285) -Fix [FS#2263]: A train inside a wormhole could free the reservation of another train inside the wormhole. 16 years ago
rubidium 9474db5cb6 (svn r14258) -Codechange: rework the way to query the vehicle hash to make sure it always results in the same irregardless of the order of the hash-linked-list.
-Fix: desync in PBS reservation following, vehicle flooding and road vehicle overtake/follow code.
16 years ago
rubidium c8e8911ef6 (svn r14223) -Codechange: make GetSprite aware of the 4 different types of sprites: fonts, recolour, mapgen and normal sprites. 16 years ago
frosch 12f38e56df (svn r14132) -Fix (r14039): Only reserve a path on leaving a station if the current block really is a PBS block. (michi_cc) 16 years ago
glx ef0458c739 (svn r14110) -Fix: desyncs due to bubbles in toyland 16 years ago
rubidium 99efe9aaae (svn r14097) -Fix [FS#2085]: one couldn't get a list of vehicles sharing an order when the number of orders was 0; you could see that the vehicles had a shared order though. 16 years ago
rubidium abd9f74871 (svn r14096) -Codechange: merge the shared order's vehicle list management to a single location. 16 years ago
frosch ca3f1f6406 (svn r14095) -Fix (r14076): Trains shall not stop instantly. 16 years ago
rubidium b6b9cd9d51 (svn r14089) -Fix [FS#2219]: trains not being able to find a route to a depot when the front is already in the depot. 16 years ago
frosch 9751fbe4dc (svn r14085) -Cleanup (r14083): Remove no longer used functions. 16 years ago
frosch f7826f8a37 (svn r14083) -Fix [FS#1264, FS#2037, FS#2038, FS#2110]: Rewrite the autoreplace kernel. 16 years ago
frosch 844a83ed58 (svn r14076) -Codechange: Merge the four start/stop commands into a single CMD_START_STOP_VEHICLE. 16 years ago
rubidium 2d94337e1a (svn r14064) -Fix [FS#1752]: check for the length of strings (in bytes) in the command. Checking for the length in pixels is impossible because that differs per client. 16 years ago
rubidium 8726c2fd99 (svn r14039) -Fix [FS#2217]: reversing an overlength train at a station would try to find a route out and sometimes reset the unload counter making it wait 2.5 years before departing instead of waiting until the train would actually leave the station (michi_cc) 16 years ago
rubidium e9c33fb288 (svn r13950) -Add [YAPP]: Trains can now also be in a 'stuck' state when waiting on a path reservation. (michi_cc) 16 years ago
rubidium ad36ea6b29 (svn r13912) -Codechange: remove some casts by returning the proper type instead of void*. 16 years ago
smatz aae2aa64c4 (svn r13816) -Fix [FS#2150]: check for vehicle length changes outside a depot (callback 0x11) and give a warning about that 16 years ago
rubidium d06529ef4d (svn r13719) -Codechange: rename IsValidPlayer to IsValidPlayerID in line with all other structs/classes that are in a pool. 16 years ago
rubidium d974acac89 (svn r13681) -Revert (r13678, r13677): the fixes didn't work in all cases (assertions on savegame loads).
-Fix [FS#2102]: but now in a hopefully beter way.
16 years ago
rubidium 03d32e12fb (svn r13680) -Fix: NPF crashing when a ship tried to find a nearby depot when on an aqueduct. 16 years ago
rubidium 3a793ceea9 (svn r13678) -Fix (r13677): electric trains from pre elrail savegames would get stopped on load. 16 years ago
smatz 58d63ec726 (svn r13475) -Fix (r13464): crash on destroying aquaduct with ship on in and on company bankrupt 17 years ago
rubidium 2f3b88ef9a (svn r13343) -Codechange: reorder/move variable/functions in the network headers so that nothing from the network directory needs to include basically all network headers. 17 years ago
rubidium 923e21129c (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games. 17 years ago
peter1138 f9fc53f98a (svn r13307) -Codechange: Separate VehicleList and its two functions so only the 3 users include it, reducing dependencies on misc/smallvec.h 17 years ago
peter1138 02b5ffa13f (svn r13266) -Codechange: Use SmallVector in GUIList 17 years ago
rubidium 8c9cc415e3 (svn r13255) -Codechange: move _opt to _settings. 17 years ago
rubidium 4625695653 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
17 years ago
peter1138 6ea832ec7c (svn r13250) -Codechange: Use VehicleList in SendAllVehiclesToDepot() 17 years ago
peter1138 56f78e6412 (svn r13248) -Codechange: Use VehicleList for depot GUI. 17 years ago
peter1138 cfc8ed1f5b (svn r13246) -Fix (r13245): incorrect parameters to memcpy 17 years ago
peter1138 da8bb14cec (svn r13245) -Codechange: Use SmallVectors for generating vehicle lists, simplifying calling code somewhat. 17 years ago
peter1138 f6ea07e7d8 (svn r13241) -Codechange: Simplify CmdDepotSellAllVehicles() a bit 17 years ago
peter1138 d9805b46b9 (svn r13240) -Codechange: More const-ness for GUI code. 17 years ago
peter1138 c34b458ace (svn r13232) -Codechange: Simplify BuildDepotVehicleList() 17 years ago
rubidium 9defec7876 (svn r13165) -Codechange: replace some RebuildXXXList/ResortXXXList+InvalidateWindowXXX with InvalidateWindowXXXData. 17 years ago
rubidium 9717e1ef07 (svn r13146) -Codechange: vehicle_base.h doesn't need to be included in vehicle_gui.h. 17 years ago
rubidium 87015f5b63 (svn r13140) -Codechange: move the gui-list-sorting out of window_gui.h so window_gui.h only needs to be included in *_gui.cpp. 17 years ago
bjarni 5469686001 (svn r13125) -Fix [FS#2000](r12913): [autoreplace] failing replacement and restoring a vehicle will no longer decrease the vehicle count in groups 17 years ago
rubidium 76b8970a33 (svn r13100) -Codechange: reduce the amount of parameters passed via AddNewsMessage as there is (for each news message type) a tuple of 4 parameters that is the same for all calls. 17 years ago
smatz ec627dedf8 (svn r13090) -Codechange: add functions for direct conversion from DiagDirection to Track and Trackbits 17 years ago
peter1138 6bfd695002 (svn r13087) -Codechange: Constify CalcPercentVehicleFilled() (michi_cc) 17 years ago
glx c708ab3b48 (svn r13047) -Codechange: remove vp_d 17 years ago
glx e48a351f8e (svn r13008) -Fix [FS#1997]: silence some MSVC x64 warnings 17 years ago
bjarni 0cfd2baa3c (svn r12988) -Fix [FS#1992](r12913): [autoreplace] failing to replace a road vehicle could free it's slot without the vehicle knowing it (leading to assert) 17 years ago
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 17 years ago
bjarni dbf6e344a4 (svn r12940) -Fix [FS#1974](r12913): [autoreplace] a vehicle backup should include the cargo packets in the vehicle as well 17 years ago
peter1138 a00371c8db (svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist. 17 years ago
peter1138 5ca6fd67fc (svn r12917) -Codechange: standardise variable names called with FOR_ALL_ENGINEIDS_OF_TYPE 17 years ago
bjarni 757de2bdf5 (svn r12913) -Add: ability to backup and restore a player's economic data and data for a vehicle (or chain of vehicles)
Autoreplace uses this with the following benefits:
  -Mass autoreplace (the button in the depot window) will now estimate costs correctly
  -Autoreplace now either replaces correctly or manages to keep the original vehicle (no more broken trains)
  Thanks to Ammler for testing this
17 years ago
smatz 805e1db332 (svn r12904) -Fix [FS#1953]: remove trams from savegames saved in OTTD without tram support, it is better than to simply crash 17 years ago
smatz 9fc355fca5 (svn r12862) -Codechange: reduce code duplication for VehicleType -> WindowClass lookup 17 years ago
peter1138 60eb3c034f (svn r12860) -Fix [FS#1947]: Train depart animation trigger was not called in some cases. 17 years ago
rubidium b139756e2b (svn r12804) -Codechange: move the effect vehicle handling out of vehicle.cpp 17 years ago
rubidium f55ffd14bd (svn r12803) -Cleanup: rename SpecialVehicle to EffectVehicle to have a uniform naming of the thing instead of using both names for the same thing. 17 years ago
rubidium 15680e477a (svn r12800) -Codechange: move the animated tile related functions out of texteff.cpp (it isn't a text effect after all). Also remove a few more functions from functions. 17 years ago
bjarni 01549e1574 (svn r12792) -Codechange: [autoreplace] added a function to figure out if a replacement is needed and if so, to which EngineID
It's designed to save a bit of CPU time, specially if the replacement isn't buildable (think autorenew of old vehicle)
17 years ago
bjarni ad3ef0fb26 (svn r12791) -Codechange: [autoreplace] Added a flag parameter (listens for DC_EXEC and DC_QUERY_COST) and included more info when returning CommandCost
This allowed cleaning up the code in MaybeReplaceVehicle()
17 years ago
rubidium fb466f4db2 (svn r12772) -Codechange: some vehicle.cpp coding style. 17 years ago
rubidium acafc26426 (svn r12762) -Fix: tabs after the first non-tab character are generally not okay (or lines starting with a space and then tabs). 17 years ago
rubidium 02cdf01507 (svn r12754) -Codechange: split depot.h into depot_map.h, depot_func.h and depot_base.h and remove quite a lot of unneeded (before this) includes of depot.h. 17 years ago
smatz 059e94e355 (svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used 17 years ago
smatz 9488db56d4 (svn r12745) -Codechange: a bit of naming conventions, introduce Is*DepotTile() 17 years ago
glx 3a84a74f4d (svn r12711) -Codechange: remove unneeded loops 17 years ago
rubidium e1ab9c2eea (svn r12684) -Fix [FS#1891]: manually given service at depot order is not forgotten anymore when autoservice 'interferes'. 17 years ago
rubidium 8c89250f58 (svn r12669) -Fix (r12667): crash when a vehicle has never been to a station and the load percentage conditional variable is evaluated. 17 years ago
rubidium 8226c92c8a (svn r12664) -Codechange: do not force the 'color' pointer to be non-NULL when trying to get the load percentage. 17 years ago
rubidium 00051b2721 (svn r12659) -Cleanup: some style cleanups in vehicle.cpp. 17 years ago
rubidium 570519d79b (svn r12658) -Codechange: unify a vast portion of the CmdSend<VehicleType>ToDepot commands. 17 years ago
rubidium 5992dad01f (svn r12648) -Feature: allow four different non-stop types in a single game instead of two. The "TTDP compatible order" setting now only sets the default behaviour of new trains.
-Feature: allow three different load type in a single game instead of two. One can choose full load all and full load any instead of full load being governed by the "full load any" patch setting.
17 years ago
frosch 96700d5605 (svn r12629) -Codechange: Split VehicleNeedsService() into Vehicle::NeedsServicing() and Vehicle::NeedsAutomaticServicing().
-Fix (r11052): Disable servicing by service-interval if a vehicle has depot orders.
17 years ago
rubidium d74c6ffb62 (svn r12617) -Codechange: add type safety to the Order's load and unload types. 17 years ago
rubidium f1cd7ef5ee (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness. 17 years ago
rubidium c57a1d74c3 (svn r12600) -Codechange: make GetNonStopType return a more augmented type; not is there a non-stop order but the kind of non-stop order, so one doesn't need to check _patches.new_nonstop type everywhere. 17 years ago
smatz 6af1fb2bdd (svn r12599) -Codechange: force AllocateSafeRaw() to be linked to simplify compiler's decisions about inlining 17 years ago
rubidium fb1c4eccd8 (svn r12593) -Codechange: hide Order's flags in most of the code. 17 years ago
rubidium d6623cf654 (svn r12588) -Codechange: do not access the destination of an order directly. 17 years ago
rubidium e68b2088ce (svn r12586) -Codechange: do not access an order's refit variables directly. 17 years ago
rubidium 630d5ad766 (svn r12585) -Fix (r12584): assumption that assertions were enabled during compilation/testing was flawed. 17 years ago
rubidium 5b47f81b0f (svn r12584) -Codechange: do not access the order type directly. 17 years ago
frosch 15a9fba867 (svn r12531) -Codechange: Rename some variables for consistency. 17 years ago
rubidium ef2be7d0fc (svn r12490) -Codechange: rename engine.h to engine_func.h and remove unneeded inclusions of engine.h and/or replace them with engine_type.h. 17 years ago
rubidium 2edd403656 (svn r12489) -Codechange: split station.h into station_base.h and station_func.h. 17 years ago
rubidium 4a1035ab95 (svn r12488) -Codechange: split order.h into order_base.h and order_func.h. 17 years ago
rubidium eeabab4555 (svn r12459) -Codechange: split news.h into news_type.h and news_func.h. 17 years ago
bjarni 06c0e5df5a (svn r12421) -Feature: [autoreplace] the autoreplace button in train depots will now also replace wagons even if they aren't connected to a locomotive
fixed estimated cost in CmdDepotMassAutoReplace() (will still not estimate wagon removal profits)
  Made it possible to command CmdDepotMassAutoReplace() to either replace everything or nothing (the button will still happily replace just some of the vehicles if cash premits)
17 years ago
peter1138 bc8ad5c743 (svn r12339) -Fix (r12331): Recalculate cached train data after clearing reversing flag when entering depot. 17 years ago
glx b64f637c72 (svn r12331) -Feature: [NewGRF] vehicle variable FE bit 8 17 years ago
bjarni 8290a798fc (svn r12231) -Cleanup (r12230): [autoreplace] moved Vehicle::NeedsAutorenewing() and added comments 17 years ago
smatz 13781ec11b (svn r12163) -Fix [FS#1705]: if a train is 'stopping' when entering a depot, do not let it leave again 17 years ago
smatz a0ddc43e92 (svn r12134) -Change: count the number of ticks a vehicle was running this day to calculate running cost
-Fix [FS#1739]: vehicle profit is now counted with 8bit fract, so it is now shown properly in the vehicle details window
17 years ago
glx efe831934a (svn r12097) -Fix (r654, r1525): loading old, pre savegame version 2, savegames. 17 years ago