Commit Graph

271 Commits (1ceb349779223715b9019523520d53007a32d7f5)

Author SHA1 Message Date
rubidium 1ceb349779 (svn r16389) -Codechange: use RoadVehicle instead of Vehicle where appropriate 15 years ago
rubidium 521c265282 (svn r16384) -Codechange: move u.effect to EffectVehicle 15 years ago
rubidium 86fc432293 (svn r16382) -Codechange: make GetVehicleTrackdir a member function of Vehicle. 15 years ago
smatz 70d3ed15c8 (svn r16376) -Codechange: Vehicle::Tick() now returns false if the vehicle was deleted 15 years ago
smatz 512db5248e (svn r16352) -Codechange: use PoolItem::GetIfValid() instead of PoolItem::IsValidID() and PoolItem::Get() 15 years ago
rubidium 8df6765823 (svn r16340) -Codechange: introduce SoundID (uint16) and use that instead of SoundFX, which was used as a byte and uint16 at different places, when the uint16 sound ID is meant. 15 years ago
smatz 0c10daa243 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 15 years ago
smatz d495dc5dbc (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 15 years ago
frosch 2431cc099e (svn r16303) -Codechange: Use the question mark as default sprite when creating vehicles, instead of arbitrary sprites not related to the vehicle. (though that also applies to the question mark) 15 years ago
smatz c189a15e3e (svn r16302) -Codechange: remove Vehicle::AllocateList 15 years ago
frosch 8bb92c110d (svn r16260) -Codechange: Add Vehicle::IncrementOrderIndex() to deduplicate some code. 15 years ago
rubidium 5c5b357043 (svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible. 15 years ago
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