Commit Graph

254 Commits (bdab37b11aedc6bf2356c3c50ab1496193bf85ef)

Author SHA1 Message Date
frosch cfea2d428b (svn r15654) -Fix: Only ever call any vehicle callbacks after the whole articulated engine has been built. (except 0x16) 16 years ago
rubidium accb79049e (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 52f5717a66 (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 d3850e101c (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 b674d1f6f5 (svn r15540) -Fix: Testing of 'only_this' in CmdRefitRoadVeh() could be skipped by 'continue'. 16 years ago
frosch 15789a76c1 (svn r15534) -Codechange: Rename some variables. 16 years ago
rubidium d846eef0b6 (svn r15434) -Codechange: bit of type safety for the DC_xxx flags. 16 years ago
rubidium c0a8d09ca7 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 16 years ago
rubidium 9bc7e4bdb2 (svn r15375) -Fix [FS#2605]: a tram circling around in a depot did never actually 'enter' the depot. 16 years ago
rubidium 0cfc402823 (svn r15374) -Codechange: remove a magic constant. 16 years ago
frosch 7f198507f7 (svn r15358) -Add [NoAI]: AIEventVehicleCrashed::GetCrashReason() 16 years ago
frosch 9c4c0ff3a1 (svn r15326) -Fix: Old-ai-ishm when refitting vehicles. 16 years ago
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
frosch 7dbd0582b6 (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 c1cf3934fa (svn r15263) -Codechange: added Engine::GetCost() to remove some code duplication. 16 years ago
glx c5f0fe7c40 (svn r15210) -Fix: Vehicle::GetRunningCost() was wrong for ships and aircraft 16 years ago
smatz e00cf92f47 (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 a3dd7506d3 (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 11da45ee55 (svn r14949) -Cleanup: pointer coding style 16 years ago
frosch aedc0c1302 (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 c0efc759ef (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 67bf6a0998 (svn r14835) -Change: apply the 'warn if train's income is negative' setting to other vehicle types, too 16 years ago
rubidium 87e5a8b52b (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 16 years ago
rubidium 3ebe66a5e4 (svn r14748) -Codechange: unduplicate window updating when deleting vehicles. 16 years ago
frosch 1a866c7552 (svn r14578) -Fix (r2389, r10811)[FS#Vikthor]: Allow capacity callbacks (15, 36) to return zero capacity. 16 years ago
rubidium c7f3935506 (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 a6df995fbb (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 2611fbeb18 (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 b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 16 years ago
rubidium 3b798599b6 (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 cccd1a8739 (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 66be028ad4 (svn r14307) -Fix: when deleting a station, remove news items regarding it 16 years ago
rubidium fc62d736f7 (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 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 3663965f3e (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 9d0e1b635a (svn r14078) -Codechange: Rename *VehicleInfo::base_cost to cost_factor, indicating what it actually is. 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 ad36ea6b29 (svn r13912) -Codechange: remove some casts by returning the proper type instead of void*. 16 years ago
smatz 447ec39f49 (svn r13691) -Codechange: make it easier to determine whether a command is ran in the context of autoreplace or not 16 years ago
rubidium f06daceb16 (svn r13664) -Fix [FS#2117]: bus/truck forgetting go-to-depot order when entering a non-drivethrough road stop. 16 years ago
skidd13 9335a28cb5 (svn r13647) -Codechange: replace MAX_UVALUE() for std types with the equivalent constant 16 years ago
rubidium bd31dda2fb (svn r13581) -Fix [FS#2040]: RVs continueing onto next DT station when they are build adjacent to them. 16 years ago
rubidium da524e71ae (svn r13480) -Fix [FS#2050]: RVs stoppping at drive through stations of other companies. 16 years ago
smatz bd5067b5a0 (svn r13456) -Codechange: use AllocaM() macro instead of alloca() at most places 16 years ago
glx ee256e770a (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 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. 16 years ago
rubidium 8c9cc415e3 (svn r13255) -Codechange: move _opt to _settings. 16 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.
16 years ago
rubidium 9defec7876 (svn r13165) -Codechange: replace some RebuildXXXList/ResortXXXList+InvalidateWindowXXX with InvalidateWindowXXXData. 16 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. 16 years ago