Commit Graph

459 Commits (8321c2d0fa3f505333948a8c180ca5ce04a60837)

Author SHA1 Message Date
rubidium c3e87f345d (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 16 years ago
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. 16 years ago
rubidium 404cff525b (svn r15677) -Fix [FS#2546]: vehicle images would be determined during the process of moving the vehicle which means that only the (orientation) data for the vehicles in front of it is valid. Now the data for the vehicles behind the vehicle are valid too. 16 years ago
rubidium b003536ea8 (svn r15676) -Codechange: remove the need for BeginVehicleMove and merge VehiclePositionChanged and EndVehicleMove. 16 years ago
rubidium 77a1323eef (svn r15671) -Codechange: bit of coding style/clarification. 16 years ago
frosch 90a81da62b (svn r15654) -Fix: Only ever call any vehicle callbacks after the whole articulated engine has been built. (except 0x16) 16 years ago
rubidium 7c084bb3e6 (svn r15635) -Fix [FS#2707]: don't allow more than 64 road vehicles to reserve a slot at a single road stop. 255 + 1 gives trouble, but 64 is even more than the roadstop would be able to handle within the slot timeout time. 16 years ago
rubidium 251f6f676f (svn r15596) -Change: road vehicles can stop at stops when they own the stop, not when they own the road/tram track. 16 years ago
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.
16 years ago
frosch 9eb880ab43 (svn r15540) -Fix: Testing of 'only_this' in CmdRefitRoadVeh() could be skipped by 'continue'. 16 years ago
frosch 8eb906dda9 (svn r15534) -Codechange: Rename some variables. 16 years ago
rubidium 5c8cf85613 (svn r15434) -Codechange: bit of type safety for the DC_xxx flags. 16 years ago
rubidium 89e1afdaa0 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 16 years ago
rubidium d45d8d23d3 (svn r15375) -Fix [FS#2605]: a tram circling around in a depot did never actually 'enter' the depot. 16 years ago
rubidium 7215e28774 (svn r15374) -Codechange: remove a magic constant. 16 years ago
frosch f6fa77d5f9 (svn r15358) -Add [NoAI]: AIEventVehicleCrashed::GetCrashReason() 16 years ago
frosch 55728d9e18 (svn r15326) -Fix: Old-ai-ishm when refitting vehicles. 16 years ago
smatz 9021c20b5e (svn r15299) -Cleanup: remove many redundant includes 16 years ago
frosch 9a0d88176b (svn r15286) -Fix: Refitting did not invalidate vehicle-colour-maps of road-vehicles, ships and aircraft, as well vehicle-length of road-vehicles. 16 years ago
glx 470da22ac3 (svn r15263) -Codechange: added Engine::GetCost() to remove some code duplication. 16 years ago
glx 12c89708cb (svn r15210) -Fix: Vehicle::GetRunningCost() was wrong for ships and aircraft 16 years ago
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
16 years ago
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
16 years ago
rubidium 28ea38ae55 (svn r14949) -Cleanup: pointer coding style 16 years ago
frosch 62f3aa89f2 (svn r14903) -Fix: First create all articulated parts of roadvehicles, then call callback 36 capacity, also call it for all articulated parts. 16 years ago
peter1138 bd803696b3 (svn r14869) -Feature: Allow road vehicles to move multiple steps in a tick (code based on train movement code) and add support for RV prop 15. This gives RVs a maximum speed of 318mph instead 79mph. This only implements higher speeds, not 'realistic acceleration'. 16 years ago
smatz ec7ebf2170 (svn r14835) -Change: apply the 'warn if train's income is negative' setting to other vehicle types, too 16 years ago
rubidium e83cca7d13 (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 16 years ago
rubidium 0c6c3311c9 (svn r14748) -Codechange: unduplicate window updating when deleting vehicles. 16 years ago
frosch 24bd9866f8 (svn r14578) -Fix (r2389, r10811)[FS#Vikthor]: Allow capacity callbacks (15, 36) to return zero capacity. 16 years ago
rubidium 0b3706a8d3 (svn r14566) -Fix [FS#2397]: RV's go via order would reserve a slot at the 'via' station which it never uses, which makes it unlikely that it reserves a slot for the next station and that makes queueing fail (Aali) 16 years ago
rubidium c936cda4de (svn r14545) -Fix [FS#2386]: road vehicles sometimes never got their "slots" deallocated causing RVs not going to depot for service. 16 years ago
smatz b0ff0245e8 (svn r14458) -Fix [FS#2341](r14368): crash when there was a tram dead end after a station/tunnel/bridge (frosch123 and Rubidium) 16 years ago
rubidium e589c7e580 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 16 years ago
rubidium f56e630e5c (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 16 years ago
rubidium 0f56f52080 (svn r14368) -Fix [FS#1852]: trams jumping when reversing on a single trambit (like caused during road construction reworks) or when (manually) reversing in a corner. 16 years ago
smatz 7e4e999a97 (svn r14307) -Fix: when deleting a station, remove news items regarding it 16 years ago
rubidium 4ea5308d49 (svn r14306) -Codechange: unify the code to draw the vehicle list.
-Fix [FS#2292]: inconsistency between drawn vehicle lists in the vehicle list and group windows.
16 years ago
rubidium 6e67ea1f9d (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 d063758582 (svn r14090) -Fix: the vehicle window of articulated road vehicles would show the clone/refit button when the vehicle was not completely stopped in the depot. 16 years ago
peter1138 550fc3a3f5 (svn r14078) -Codechange: Rename *VehicleInfo::base_cost to cost_factor, indicating what it actually is. 16 years ago
frosch c8e699cc35 (svn r14076) -Codechange: Merge the four start/stop commands into a single CMD_START_STOP_VEHICLE. 16 years ago
rubidium 2b6978e48e (svn r13912) -Codechange: remove some casts by returning the proper type instead of void*. 16 years ago
smatz a47b118a80 (svn r13691) -Codechange: make it easier to determine whether a command is ran in the context of autoreplace or not 16 years ago
rubidium 4642e9f75a (svn r13664) -Fix [FS#2117]: bus/truck forgetting go-to-depot order when entering a non-drivethrough road stop. 16 years ago
skidd13 0a178274e2 (svn r13647) -Codechange: replace MAX_UVALUE() for std types with the equivalent constant 16 years ago
rubidium 5b615eae3a (svn r13581) -Fix [FS#2040]: RVs continueing onto next DT station when they are build adjacent to them. 16 years ago
rubidium 8e7f5072ce (svn r13480) -Fix [FS#2050]: RVs stoppping at drive through stations of other companies. 16 years ago
smatz 506cde94b6 (svn r13456) -Codechange: use AllocaM() macro instead of alloca() at most places 16 years ago
glx b60a1326bf (svn r13390) -Codechange: introduce usererror() for fatal but not openttd related errors. Now all error() will 'crash' openttd after showing the message in win32 releases (MSVC), creating a crash.log and crash.dmp (like the '!' hack used before). On the other hand, usererror() will just close the game. So use error() only when it can be helpful to debugging, else use usererror(). 16 years ago
rubidium e7a501100a (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. 16 years ago
rubidium d289464d69 (svn r13255) -Codechange: move _opt to _settings. 16 years ago
rubidium dc77647ea4 (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.
16 years ago
rubidium 3ee2556585 (svn r13165) -Codechange: replace some RebuildXXXList/ResortXXXList+InvalidateWindowXXX with InvalidateWindowXXXData. 16 years ago
rubidium 373343cef6 (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. 16 years ago
smatz 2be223fc03 (svn r13090) -Codechange: add functions for direct conversion from DiagDirection to Track and Trackbits 16 years ago
rubidium 1ce0b03bf0 (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. 16 years ago
peter1138 45034bc522 (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. 16 years ago
peter1138 a05e9b4c6b (svn r12824) -Codechange: Standardise routines for drawing vehicle images, using correct types and less duplication. 16 years ago
rubidium bbe13a0623 (svn r12818) -Codechange: make callbacks 31 and 37 behave like they do in TTDP according to frosch's survey. 16 years ago
rubidium 8186344628 (svn r12804) -Codechange: move the effect vehicle handling out of vehicle.cpp 16 years ago
rubidium 40b19f3997 (svn r12803) -Cleanup: rename SpecialVehicle to EffectVehicle to have a uniform naming of the thing instead of using both names for the same thing. 16 years ago
rubidium a63974547b (svn r12795) -Fix [FS#1938]: vehicles could break down during loading and keep loading. The intention of the break down code is not to break down when having zero speed, therefor break downs now do not happen when loading. 16 years ago
rubidium ca1f8fbe2e (svn r12761) -Codechange: lots of minor whitespace coding style fixes around operators. 16 years ago
rubidium 6d063c3ad6 (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. 16 years ago
smatz ec588da9e8 (svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used 16 years ago
smatz 966e476df8 (svn r12745) -Codechange: a bit of naming conventions, introduce Is*DepotTile() 16 years ago
rubidium a277d2df86 (svn r12689) -Feature: non-stop(or rather no non-stop) and via orders for road vehicles. 16 years ago
rubidium daf5a2f1bc (svn r12658) -Codechange: unify a vast portion of the CmdSend<VehicleType>ToDepot commands. 16 years ago
rubidium aa8a5b2c39 (svn r12657) -Codechange: add 'FindClosestDepot' to the vehicle class. 16 years ago
frosch b91781b715 (svn r12629) -Codechange: Split VehicleNeedsService() into Vehicle::NeedsServicing() and Vehicle::NeedsAutomaticServicing().
-Fix (r11052): Disable servicing by service-interval if a vehicle has depot orders.
16 years ago
rubidium cf250390c5 (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. 16 years ago
rubidium fcdd44b662 (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. 16 years ago
rubidium 53d101cc99 (svn r12593) -Codechange: hide Order's flags in most of the code. 16 years ago
rubidium 935b562074 (svn r12588) -Codechange: do not access the destination of an order directly. 16 years ago
rubidium 3b0e3d8d30 (svn r12584) -Codechange: do not access the order type directly. 16 years ago
rubidium ba0a9538cf (svn r12578) -Codechange: merge the aircrafts ProcessOrder too into the 'unified' ProcessOrder. 16 years ago
rubidium 3fdddeac40 (svn r12575) -Codechange: unduplicate Process*Orders for trains, ships and road vehicles. 16 years ago
frosch ae01e263ad (svn r12540) -Codechange: Enumify some values in original pathfinder and remove an unused variable. 16 years ago
frosch 51155403a4 (svn r12531) -Codechange: Rename some variables for consistency. 16 years ago
rubidium df1d9bd880 (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. 16 years ago
rubidium c51b81c247 (svn r12489) -Codechange: split station.h into station_base.h and station_func.h. 16 years ago
rubidium b84b16cfcd (svn r12488) -Codechange: split order.h into order_base.h and order_func.h. 16 years ago
rubidium 2426f5342f (svn r12459) -Codechange: split news.h into news_type.h and news_func.h. 16 years ago
rubidium edd384c121 (svn r12390) -Fix [FS#1851]: trams failing to turn on bridge heads/tunnel entrances. 17 years ago
peter1138 f6e4dc4d8c (svn r12209) -Fix: [NewGRF] Support using any base price for rail and road vehicles' running cost, and show running cost of wagons if they have it. 17 years ago
frosch 7f3d56041b (svn r12199) -Codechange: Remove magic around the results of GetTileTrackStatus(). 17 years ago
frosch 1d120c51b8 (svn r12193) -Codechange: Rename a magic variable, give it a decent type, and remove a 'goto'. 17 years ago
frosch ca2eb0676c (svn r12191) -Fix: Do not start overtaking if the RV reaches wrong-way one-way-road in the next tiles. 17 years ago
frosch 514df81e27 (svn r12141) -Codechange: Introduce IsNormalRoad[Tile](), IsRoadDepot[Tile]() and HasTileRoadType(); and use them. 17 years ago
smatz fe48d0be21 (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
smatz 391898b47a (svn r12132) -Cleanup: convert pathfinder selection from if/else to switch/case at many places 17 years ago
smatz a3e3cd7d46 (svn r12129) -Change [FS#1759]: simplified patch settings for pathfinders (Yorick) 17 years ago
frosch f476d861d2 (svn r12085) -Fix(r12058): Road vehicles could get stuck, when NPF told them to reverse on junction tiles. (spotted by SmatZ) 17 years ago
belugas 70241f804b (svn r12081) -Codechange: Rename table/roadveh.h to table/roadveh_movment.h
It is more descriptive name and it will not upset the generate script anymore
17 years ago
belugas 7f5f48281c (svn r12066) -Codechange: Rename GetBridge for the more common GetBridgeSpec
-Codechange: Remove direct access to the _bridge table in favor of the above mentioned GetBridgeSpec
-Codechange: Rationalize the use of Bridge type pointer
17 years ago
glx 7ce12e50da (svn r12037) -Codechange: replace OnNewDay_(Aircraft|RoadVeh|Ship|Train) with an OnNewDay method in the Vehicle class 17 years ago
maedhros f95fb570ad (svn r11994) -Codechange: Remove numbers from string names where the strings aren't present in TTD, since they don't correspond to either TTD's TextIDs or OpenTTD's StringIDs. 17 years ago
smatz 881b74e882 (svn r11962) -Cleanup: OPF is no longer used to update signals 17 years ago
smatz 8be486c27e (svn r11960) -Cleanup: simplify some IsTunnel(Tile) / IsBridge(Tile) conditions 17 years ago
smatz dfb91c26ec (svn r11916) -Codechange: use enums from VehicleViewWindowWidgets instead of constants
-Fix: refit button widget was not correctly updated
17 years ago
smatz fc2895e8c2 (svn r11882) -Codechange: introduce MarkSingleVehicleDirty() and simplify the code at some places 17 years ago
rubidium 736640fd87 (svn r11866) -Codechange: swap OFB_* and OF_* so it conceptually in sync with other cases of *B_* vs *_* like VETSB_* and VETS_*. 17 years ago
rubidium 9c0c798dd8 (svn r11834) -Codechange: only include settings_type.h if needed. 17 years ago
rubidium 975f1b4825 (svn r11830) -Fix [FS#1625]: road vehicles would not wait in line, but at a single point on bridges. Based on a patch by SmatZ. 17 years ago
rubidium 90acd52f22 (svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h. 17 years ago
rubidium bfa6087e0f (svn r11825) -Fix (FS#1627): an articulated road vehicle could split up when it turned around at a corner and then would enter a drive through station at the next tile. 17 years ago
peter1138 0f7392bd61 (svn r11822) -Codechange: Replaced fixed size custom name array. Names are now attached to their object directly and there is
no limit to the amount of names.
-Fix: NewGRF engines could not be renamed.
17 years ago
rubidium 2fc62eab05 (svn r11818) -Codechange: split player.h into smaller pieces. 17 years ago
rubidium 2d2e1e3863 (svn r11800) -Codechange: move some functions to a more logical location + some type safety. 17 years ago
rubidium 0365c1f33b (svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114). 17 years ago
peter1138 0ae26a0312 (svn r11789) -Codechange: coding style for global variable names 17 years ago
rubidium 64d691bacc (svn r11787) -Codechange: more header rewrites. This time related to viewport.h. 17 years ago
rubidium e2f7ec1d3e (svn r11775) -Codechange: move all autoreplace/autorenew functions to a single location. 17 years ago
rubidium 444e77d8bc (svn r11774) -Change: do not include variables.h in a header when it is not needed. 17 years ago
peter1138 588f1d2aca (svn r11770) -Codechange: An engine type's type is EngineID, not byte. 17 years ago
rubidium 445a733eb6 (svn r11719) -Codechange: split sound.h in a header with types and one with functions. 17 years ago
smatz c10d3da133 (svn r11707) -Fix: do not allow refitting flooded (destroyed) vehicles 17 years ago
rubidium 722613f7f3 (svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes. 17 years ago
rubidium db73addb43 (svn r11702) -Codechange: move all date related stuff to date*. 17 years ago
rubidium f82aeb82c5 (svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h). 17 years ago
rubidium 81bf9f8503 (svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h' 17 years ago
rubidium 3074bca136 (svn r11680) -Codechange: refactor more out of openttd.h and functions.h. 17 years ago
rubidium 766551b0bc (svn r11677) -Codechange: move price and command related types/functions to their respective places. 17 years ago
rubidium 8427b8bad2 (svn r11675) -Codechange: split the string types from the string functions. 17 years ago
rubidium be923601bf (svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h 17 years ago
smatz d56a690ba4 (svn r11649) -Codechange: some code can be simplified thanks to changes in r11642 17 years ago
smatz 926fe5c9e9 (svn r11644) -Codechange: merge some functions from tunnel_map.h and bridge_map.h into tunnelbridge_map.h 17 years ago
smatz 60f9bbd17e (svn r11642) -Codechange: VehicleFromPos does check for v->tile == tile, so remove useless checks 17 years ago
rubidium 745da6563f (svn r11621) -Fix [FS#1525]: there were still some cases where one could not build a tram track, but the tram could become blocked. 17 years ago
rubidium 4f0e072f3f (svn r11571) -Fix [FS#1493]: road vehicle getting to the wrong side of a station when trying to overtake in there. 17 years ago
skidd13 5d74f2ced4 (svn r11564) -Codechange: Increase the usage of the for_each_bit macro and rename it fitting to the naming style 17 years ago
rubidium 825fc97077 (svn r11524) -Fix [FS#1485]: assertion when tram reversed at a station. 17 years ago
skidd13 e36dba227b (svn r11523) -Codechange: Move the CHANCE macros to core/random_func.cpp cause they depend on Random()
-Codechange: Convert the CHANCE macros to functions and rename them fitting to the naming style
17 years ago
skidd13 815b8d8df1 (svn r11510) -Codechange: merge the IS_*INSIDE* functions and rename them fitting to the naming style 17 years ago
skidd13 f92f3aec06 (svn r11485) -Codechange: Remove the doubled function ToggleBitT and rename the remaining to fit with the naming style 17 years ago
skidd13 3ae50673a3 (svn r11484) -Codechange: Remove the doubled function SetBitT and rename the remaining to fit with the naming style 17 years ago
skidd13 6801cceda1 (svn r11482) -Codechange: Remove the doubled function ClrBitT and rename the remaining to fit with the naming style 17 years ago
skidd13 c0a2c0c23e (svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style 17 years ago
rubidium a36fd1db6e (svn r11477) -Fix [FS#1451]: a road vehicle must not show that it is driving max speed when it is standing still waiting for the vehicle in from of it. 17 years ago
skidd13 f4a5c80d71 (svn r11476) -Codechange: rename the function myabs to abs to get rid of an unneeded define 17 years ago
skidd13 98f66552be (svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style 17 years ago
rubidium cea3cf2857 (svn r11461) -Fix [FS#1449] (r11449): a bus turning around in a station could case an assertion error. Patch by divide. 17 years ago
rubidium 2245094822 (svn r11449) -Fix [FS#1160]: trams could deadlock themselves. As of now trams will turn as roadvehicles do when the player cannot build a tram track piece on the next tile without destroying anything. It will not turn when the player can build the before mentioned track piece on the 'next' tile. 17 years ago
rubidium abbde80e53 (svn r11419) -Fix [FS#1388]: articulated vehicle breaking up when making a 90 degree turn immediately after a 180 degree turn. 17 years ago
truelight c3c4c894dc (svn r11385) -Fix r11383: bool operation can be hard to translate for some people ;) (tnx fjb for noticing this bug ;)) 17 years ago
truelight b935a74782 (svn r11383) -Codechange: fixed all the mess around KillFirstBit (tnx to Rubidium and skidd13) 17 years ago
truelight f1df43ec21 (svn r11382) -Codechange: renamed COUNTBITS to CountBits, as it is no longer a macro (skidd13) 17 years ago
rubidium f7cc8872f8 (svn r11367) -Fix [FS#1258]: non-articulated road vehicles should be able to overtake (not-too-long) articulated vehicles, i.e. overtaking of articulated vehicles that are several (3+) tiles long is not supported. 17 years ago
rubidium f88f2dbdc0 (svn r11366) -Fix [FS#1258]: road vehicles must not drive through eachother on bridges/in tunnels. 17 years ago
rubidium b4e7203b0a (svn r11332) -Fix: vehicles getting a value of 0 on construction.
-Fix: assertion when selling vehicles.
17 years ago
rubidium 3fe8be47ff (svn r11317) -Fix [FS#1355]: don't read a variable of a destroyed vehicle as the value will be reset to 0. 17 years ago
rubidium 2e8f93a821 (svn r11229) -Fix [FS#1307]: one could sell vehicles that were crashed in a depot, which would still yield money. 17 years ago
rubidium ca46e547de (svn r11200) -Fix [FS#1291]: road vehicles could not overtake on one way roads going to the east. 17 years ago
rubidium a28b307c95 (svn r11173) -Codechange: rename some callback enums so they are more uniform. 17 years ago
rubidium f41c8ab3aa (svn r11122) -Fix [FS#1234]: crash when building a NewGRF vehicle when the articulated build vehicle callback returneed a different value for the purchase window than the normal build. Thanks for Dalestan and _minime_ for pointers to possible causes. 17 years ago
rubidium a18f3f25a9 (svn r11120) -Codechange: remove the arbitrary limit of 10 articulated parts for a vehicle. 17 years ago
rubidium 634aba16a7 (svn r11072) -Fix [FS#1045]: when a vehicle had a service order, the goto-depot button did not make it possible to stop the vehicle at that depot. 17 years ago
rubidium 6f76bc2449 (svn r11031) -Codechange: reduce the amount of duplication of bit counting functions. Based on patches by skidd13, SmatZ and Belugas. 17 years ago
rubidium cadc470da5 (svn r11017) -Codechange: unify determining whether a vehicle needs/can be service a little more. 17 years ago
rubidium 732845440a (svn r11011) -Fix [FS#1129]: GetFirstVehicleInChain did change the game state while being marked const.
-Codechange: do not brute force determine the first vehicle in the chain or previous vehicle, but do it by properly accounting the previous and first pointers when updating the next pointer. This gives a performance increase of about 15% when there are a lot of vehicles in the game.
17 years ago
rubidium 235ad4ab6b (svn r11003) -Codechange: replace Vehicle->next to Vehicle->Next() and Vehicle->SetNext() so we can trap instances that change a next pointer and (in the future) update the first/previous pointers based on that. 17 years ago
rubidium c2dcccae16 (svn r11001) -Codechange: unify the way to determine whether a vehicle is in a depot. 17 years ago
rubidium 39f17c9de4 (svn r10983) -Codechange: use vehstatus & VS_CRASHED instead of some other "methods" custom to each vehicle to determine whether the vehicle is crashed. 17 years ago
rubidium bb368f880b (svn r10974) -Fix [FS#1144, FS#1155]: road vehicles that could not (properly) use a road stop still tried to go to that road stop. 17 years ago
maedhros 8f365e3143 (svn r10924) -Fix [FS#1120]: VS_STOPPED is only set for the front part of an articulated
road vehicle, so don't check any other parts when testing if the vehicle is
stopped inside a depot.
17 years ago
bjarni 495bc4ecf4 (svn r10823) -Fix r8610 [FS#1097]: the autoreplace window vehicle count didn't always update correctly) (Matthias) 17 years ago
rubidium 14e55dd4b9 (svn r10814) -Fix [FS#1103]/Codechange: allow trams to be reverse manually, even though there is no track to do so. 17 years ago
maedhros 83a04adb71 (svn r10812) -Fix (r10097) [FS#1093]: Make RoadVehicle::MarkDirty() mark all parts of articulated vehicles as dirty, not just the front. 17 years ago
maedhros bc3231d189 (svn r10811) -Fix (r10097): Refit all the parts of an articulated road vehicle, not just the first part. 17 years ago
maedhros 371a0c4be6 (svn r10809) -Fix (r10097): When reversing, articulated parts of road vehicles should not attempt to do their own pathfinding. 17 years ago
rubidium b21f29c38f (svn r10770) -Codechange: use the pool item class as super class for the vehicle struct.
-Codechange: do not force "special" vehicles to be allocated in the low 1024 vehicle slots and non "special" vehicles in the rest of the slots.
17 years ago
rubidium 2800a49f03 (svn r10733) -Codechange: change MP_STREET into MP_ROAD as we use the word "road" everywhere except in the tile type. 17 years ago
rubidium a67957866a (svn r10697) -Codechange: give a more sensible names to some of the unkX variables. 17 years ago
rubidium 9c9fc1a79e (svn r10672) -Codechange: typify some parameters/variables. 17 years ago
rubidium df009178d4 (svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h 17 years ago
rubidium 7cb7488836 (svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments. 17 years ago
rubidium ec137f60ed (svn r10409) -Codechange: replace (Aircraft|RoadVeh|Ship|Train)_Tick with a Tick method in the Vehicle class. 17 years ago
rubidium c0e341ee05 (svn r10408) -Codechange: make GetImage a class method of Vehicle instead of Get(Aircraft|RoadVeh|Ship|Train)Image. 17 years ago
peter1138 85fb4eb94b (svn r10363) -Fix [FS#911]: invalidating autoreplace windows didn't take account of vehicle group (Matthias Wolf) 17 years ago
matthijs 25f7e8c8a0 (svn r10345) -Fix [FS#290]: Make OPF handle coming out of a tunnel as well as going into a tunnel, to support road vehicles looking back when finding a depot while in a tunnel.
-Fix [FS#290]: Make NPF look back when finding a depot for road vehicles.
17 years ago
maedhros 9fce70ac21 (svn r10335) -Fix (r10331): Increment the current order index *after* using it in UpdateVehicleTimetable. 17 years ago
rubidium 37e3cbb980 (svn r10287) -Fix (r10266): some surprises from that (almost always) complaining compiler... 17 years ago
rubidium fc201d4ad8 (svn r10266) -Codechange: keep track of the origin, time of travel and accumulated feeder share (transfers) of individual pieces of cargo. This means that cargo isn't thrown on a big pile when it's put in a station or unloaded at a station, however the GUI does not reflect these changes yet so you will not actually see it. 17 years ago
maedhros 7fb6e8f11d (svn r10236) -Feature: Introduce a form of timetabling for vehicles. 17 years ago
rubidium 23727da96f (svn r10208) -Codechange: replace int32 with Money where appropriate. 17 years ago
rubidium 773a7c9cb6 (svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified. 17 years ago
rubidium 3ccc83e640 (svn r10197) -Codechange: replace int32 with CommandCost where appropriate. 17 years ago
maedhros f8ae742da4 (svn r10122) -Codechange: Add a CountBitsSet function and use it to replace some less efficient loops. 17 years ago
peter1138 ce590b59f3 (svn r10111) -Codechange: Add new vehicle hash table for collision detection and finding vehicles on a tile. The hash area scanned is far smaller than the old hash table, which is now used for viewport updates only. This should give a significant performance improvement for games with many vehicles. (Based on work by 'B. N. SmatZ!' and 'madman2003') 17 years ago
maedhros c186f91cbd (svn r10097) -Feature: Add support for articulated road vehicles, or callbacks 11 and 17 for
road vehicles for those who prefer the technical explanation.
17 years ago
rubidium 17dd40ea0f (svn r10029) -Fix (r9923): trams should not/cannot turn on roadworks. 17 years ago
glx 435cc84f66 (svn r10012) -Fix (r9999): crash when forcing road vehicles to turn 17 years ago
rubidium b3aa28e879 (svn r10003) -Fix (r9999): crash when vehicle had to turn on a bridge. 17 years ago
rubidium f7f289667d (svn r10002) -Fix (r9999): don't try to get the disallowed directions from a road depot... 17 years ago
rubidium 294a154bf7 (svn r9999) -Feature: make it possible to disallow busses and lorries to go a specific way on straight pieces of road. 17 years ago
rubidium 734a302fd1 (svn r9989) -Fix [FS#817]: trams/road vehicles did go to the closest road stop regardless whether they could actually "drive" on there. 17 years ago
bjarni ae9b3c41e0 (svn r9941) -Fix: trams could be cloned to appear in normal road depots and vice versa (spotted by Desolator) 17 years ago
rubidium 781f8cf61b (svn r9927) -Fix: assert triggered when letting a tram run into the wrong side of a depot. 17 years ago
rubidium 7ce4b8e29c (svn r9924) -Fix: update the road vehicle speeds when stopped and/or running just behind another vehicle. 17 years ago
rubidium a8d9b4e040 (svn r9923) -Add: support for Action 0 Road vehicles, property 1C, bit 0. 17 years ago
rubidium ce84250249 (svn r9919) -Codechange: prepare some more places for more road types. 17 years ago
rubidium 21546a66f3 (svn r9917) -Codechange: prepare some more areas for more road types. 17 years ago
rubidium 821e58ac95 (svn r9914) -Codechange: prepare GTTS and the pathfinders to handle multiple road types on a single tile. 17 years ago
rubidium fcb5e74fbb (svn r9833) -Fix: also 'leave' the station when leaving for automatic servicing. 17 years ago
peter1138 e16ea9b758 (svn r9828) -Codechange: [NewGRF] Add support for changing cargo capacity with callback 36. This is set on construction for ships and roadvehicles, and whenever carriages are attached for trains. 17 years ago
rubidium a84ca16dc4 (svn r9808) -Codechange: unify the Handle<VehicleType>Loading functions. 17 years ago
peter1138 ebe81b98ce (svn r9806) -Codechange: [NewGRF] Add callback 36 support for purchase cost, for all vehicle types. 17 years ago
rubidium 9a893ebe20 (svn r9794) -Codechange: refactor the question whether a vehicle can be loaded into LoadUnloadVehicle instead of duplicating it for each vehicle. 17 years ago
rubidium cc9d811f53 (svn r9770) -Codechange: perform the payment of cargo when loading/unloading, but when arriving at the station. 17 years ago
rubidium 5a46c763f0 (svn r9760) -Codechange: remove the need for saving some vehicle variables. 17 years ago
rubidium df59f5cd15 (svn r9755) -Codechange: refactor some more of the begin loading stuff. 17 years ago
rubidium 0def47a3b0 (svn r9754) -Codechange: make classes for all vehicle types, so we can make nicer/better maintainable code, i.e. virtual methods instead of switches. 17 years ago
rubidium dba21ab802 (svn r9752) -Codechange: remove some duplication related to BeginLoading. 17 years ago
maedhros 8acc58b731 (svn r9742) -Fix (r9689) [FS#739]: Fix cloning with refit costs again, hopefully for good this time. 17 years ago
truelight 948ef6dc1b (svn r9740) -Fix [FS#709]: removed wrong assert() that could be triggered by removing an order at the wrong moment 17 years ago
maedhros aaa917d56d (svn r9685) -Fix (r9683): Call v->LeaveStation() when a vehicle in a station is sent to a depot. 17 years ago
rubidium 7577954ced (svn r9672) -Cleanup: lots of coding style fixes around operands. 17 years ago
belugas 76faa0f759 (svn r9664) -Documentation: Doxygen corrections,errors and omissions 17 years ago
maedhros 3d81de8d7e (svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist. 17 years ago
maedhros 00d828e738 (svn r9543) -Fix [FS#691]: Split up STR_ENGINE_NOT_BUILDABLE into four strings so it can be
translated properly and remove "buildable", since it isn't actually a word.
17 years ago
belugas 34272ad201 (svn r9523) -Cleanup: doxygen changes. Time to take care of "R" 18 years ago
belugas 691f8578fd (svn r9400) -Codechange: Use some more representative enum names for landscape types. 18 years ago
peter1138 3d3d8d7c47 (svn r9303) -Codechange: Use cargo class when counting passengers in a road vehicle crash, and when loading aircraft. 18 years ago
peter1138 497e5fe565 (svn r9301) -Codechange: Use cargo class to determine if a road vehicle can stop in bus or truck stops. 18 years ago
peter1138 70e32d663a (svn r9259) -Codechange: NUM_CARGO isn't a valid cargo type... 18 years ago
bjarni 0ad237611e (svn r9072) -Codechange: [Orders] added methods to orders to free them and check if they are in use 18 years ago
rubidium 36cea84b11 (svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code). 18 years ago
rubidium 979ccd45ba (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {}; 18 years ago
rubidium 4169bfba06 (svn r9050) -Codechange: Foo(void) -> Foo() 18 years ago
maedhros 78c3edcbb1 (svn r8946) -Feature: [NewGRF] Add support for vehicle variables 0xFE and 0xFF bit 10,
which is set when a vehicle was built during the exclusive testing phase.
18 years ago
maedhros 2f557f7dc0 (svn r8945) -Codechange: Rename v->load_status to v->vehicle_flags so it can be used for more than just the gradual loading status. 18 years ago
tron 05c6e8f883 (svn r8897) -Fix
Change the signature of GetNewVehiclePos():
-void GetNewVehiclePos(const Vehicle *v, GetNewVehiclePosResult *gp);
+GetNewVehiclePosResult GetNewVehiclePos(const Vehicle *v);
18 years ago
tron 5c91ec0587 (svn r8884) -Fix
Replace SetSpeedLimitOnBridge() by something simpler
18 years ago
rubidium 98a4fc1399 (svn r8868) -Fix (r8715): road vehicles could not overtake anymore in some directions (mart3p). 18 years ago
rubidium a2999dadc9 (svn r8735) -Feature: drive-through road stops made possible by the hard work of mart3p. 18 years ago
rubidium a374caf51d (svn r8730) -Codechange: more replacements of magic numbers by enums and removal of some (by now) redundant comments. 18 years ago
rubidium ebff8b09fc (svn r8726) -Codechange: bools are 1 or 0 according to the C++ standard and refactor RoadStop::AllocateBay to remove a loop condition. Suggestions by Tron. 18 years ago
rubidium 93b78f31fb (svn r8725) -Fix (r8712): test the first bit of the bitmask, not the nth, as we are shifting the bitmask. 18 years ago
rubidium 3969f10b53 (svn r8723) -Codechange: replace yet another couple of magic numbers with enums. 18 years ago
rubidium da705e8167 (svn r8721) -Fix (8715): road vehicles could not turn around properly 18 years ago
rubidium b5dade8098 (svn r8715) -Codechange/cleanup: replace magic numbers related to state of road vehicles with enums. Original patch by mart3p. 18 years ago
rubidium fd645aa845 (svn r8712) -Codechange/cleanup: replace 'magic' constants with enums, use proper types instead of byte, uint etc., give variables more descriptive names and add some comments. 18 years ago
rubidium eb5648f382 (svn r8698) -Codechange: enumify the returns of VehicleEnterTile 18 years ago
rubidium 3f74dbe5c0 (svn r8694) -Codechange: make RoadStop's status accessible via accessor functions. 18 years ago
rubidium 654aca2b32 (svn r8692) -Cleanup: add comments to RoadVehController. Patch by mart3p. 18 years ago
bjarni f626458af7 (svn r8610) -Codechange/Feature: rewrote the list handling in the autoreplace window
-The user will notice the following changes:
      All vehicle types behaves in the same way
      Adding/removing an engine (new design and so on) can no longer result in the window selecting a new engine
      All valid replacements will be displayed since it looks at refitting options as well (this solves the missing ships with the newships GRF)
      Since you can't replace an engine into itself, the engine selected in the left list will no longer appear in the right list

   -The code changes:
      Instead of looping all engines all the time, each list generates a list like the build windows
        This ensures consistent list generation since only one function can loop all engines
      Unified code for all vehicle types
      It now use the lists to call the drawing code in the build vehicle window
      Works on selected EngineIDs instead of selected index in the list
18 years ago
rubidium ec301e0f8a (svn r8609) -Fix: a road vehicle that is very close after another (slower) road vehicle gets its speed reset to 0 when entering a tunnel, which causes a traffic jam outside of the tunnel. 18 years ago
tron cf5514ce8d (svn r8550) -Fix
Building a vehicle does not involve allocating orders, so do not check whether orders could be allocated
18 years ago
tron 059552f2d9 (svn r8538) -Fix
GetRoadStopByTile() cannot return NULL. Remove therefore unnecessary check
18 years ago