summaryrefslogtreecommitdiff
path: root/vehicle.c
AgeCommit message (Collapse)Author
2005-05-03(svn r2261) - Fix: When crashed vehicles try to find a depot for servicing, ↵matthijs
openttd asserts. Crashed vehicles shouldn't find depots anyway...
2005-05-02(svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)matthijs
- Add: GetVehicleTrackdir() helper function. - Codechange: Moved SortStruct from vehicle_gui.h to ttd.h, so the dependency from vehicle.h on vehicle_gui.h could be removed. - Codechange: Typedeffed the VehicleTypes struct so it can be used as the type for Vehicle.type instead of "byte". - Codechange: Removed prototype for VehicleSorter(), which had no implementation anymore and was never called.
2005-05-01(svn r2239) -Fix [autoreplace]: [ 1185653 ] autoreplacing a dualheaded ↵bjarni
engine into a singleheaded engine is no longer a potiontial crash It do have one side effect through. Now no engines are added/removed from the train anymore, so it produces "half dualheaded engines" This will be fixed when autoreplace will get a major overhaul at a later date
2005-04-08(svn r2167) -fix: [autoreplace] trains now get the default cargo type if ↵bjarni
the engine replaced from did not have cargo capacity (instead of refitting to passengers)
2005-04-06(svn r2156) -Fix: in revision 2104 someone forgot to add a very important ↵truelight
check in GetPrevVehicleInChain; this caused some nasty bugs in depots, like wagons without engines complain about not being stopped, and stuff like that. Hopefully this fixes those problems. With a big tnx to BJH for his perfect demo!
2005-04-03(svn r2139) -fix: "[ 1146215 ] Engine power not updated w/auto replace" ↵bjarni
autoreplace now forces an update of the cache. It should not affect gameplay as the cache is updated each time the train starts moving, it's just an instant update of the detail window
2005-03-30(svn r2109) -Fix: use FindVehicleOnTileZ(tile, 0) over ↵truelight
FindVehicleBetween(tile, tile, 0)
2005-03-29(svn r2105) -Codechange: Added a cache for the first vehicle of a chain to ↵celestar
increase performance, especially with many long trains
2005-03-29(svn r2104) Simplify implementation of Get{First,Prev}VehicleInChain() and ↵tron
remove a pointless check
2005-03-24(svn r2046) -Codechange: moved all waypoint code to waypoint.c/waypoint.htruelight
-Codechange: rewrote some functions while moving waypoint-stuff -Add: added support for 64k waypoints -Fix: made the waypoint struct a bit more logic (no bit-fucking)
2005-03-24(svn r2045) -Fix: hopefully fixed the desync problem. Please all test this ↵truelight
revision!! (with tnx to Celestar, Hackykid, dp-_ and Tron)
2005-03-24(svn r2041) -Fix: not all vehicles did get a day_proc call (because of ↵truelight
rounding errors)
2005-03-19(svn r2024) -Fix: [autoreplace] reverted all changes involving ↵bjarni
v->set_for_replacement as they caused desyncs. The bad sideeffect of this is that now no vehicle will automatically go to a depot anymore just because it is set to be autoreplaced. We will have to find a better way to solve this problem. Revisions reverted: 1640, 1707, 1709, 1710, 1712(but not the cheat prevention in this one)
2005-03-09(svn r1979) Const correctnesstron
2005-02-22(svn r1898) Remove some unused macros from macros.h and move some others to ↵tron
more appropriate headers
2005-02-14(svn r1875) Effect vehicle overhaul: enumerate sprites, descriptive names ↵tron
for functions and miscellaneous improvements
2005-02-13(svn r1869) Fix some bugs in the bulldozer movement implementation.tron
Now they move in a sane pattern.
2005-02-13(svn r1868) Improve readability of the bulldozer movement codetron
2005-02-12(svn r1863) Give the effect vehicle type enums more descriptive names and ↵tron
use the enum as parameter type for CreateEffectVehicle*() -Fix: [1116619] Generate the correct smoke type for diesel trains
2005-02-10(svn r1853) Move spritecache function declarations into a header of their ↵tron
own and use SpriteID as parameter type where appropriate
2005-02-06(svn r1832) Next byte -> char iteration: custom namestron
2005-02-06(svn r1817) -Codechange: Moved depot-functions to depot.ctruelight
-Codechange: Added wrappers around depot-access (GetDepot no exists) -Codechange: Made depot-functions a bit more logic (no longer GetDepotByTile crashes your game when you request it on a non-depot tile) -Add: made depots dynamic (yes, 64k depots are possible now)
2005-02-04(svn r1786) -Fix: unitnumber is increased to 16bit, so now you can have up ↵truelight
to 5000 trains in one game (instead of the 240 which was the current value). Default max allowed vehicles per type is changed: Trains: 500 (old 80) Road: 500 (old 80) Ships: 200 (old 40) Aicraft: 300 (old 50) (Tnx to Celestar and Darkvater for checking the patch)
2005-02-04(svn r1783) -Add: Dynamic vehicles (now up to 64k of vehicles)truelight
2005-02-02(svn r1770) -Fix: Hopefully last pieces of code that are containing a station-idtruelight
(and should be an uint16, not uint8)
2005-01-30(svn r1741) - Fix: added IsVehicleIndex() so it's possible to protect ↵bjarni
GetVehicle() from reading an invalid vehicle index - Fix: added check for v->type in some commands, which expects v to be a specific type Checks like this is needed to protect network servers from people, who hack their clients to either cheat or crash the server NOTE: if I made a mistake here it can make a function unreachable when it should be used. Here is one place to look if something weird happens
2005-01-29(svn r1721) -Feature: It is now possible to build multiple road stations (up ↵celestar
to 8) on a single station. Thanks to: Truelight for the saveload code, Darkvater and Hackykid for network testing and Tron for proof-reading 1500 lines of diff.
2005-01-29(svn r1718) Use the enum TileType as parameter/return type for ↵tron
[GS]etTileType() instead of plain int. This makes it necessary to rename TileType() to GetTileType() because a type and a function may not share the same name.
2005-01-29(svn r1713) Split off several functions which query/set information about a ↵tron
single tile from map.h and put them into a seperate file tile.h
2005-01-27(svn r1696) Use GetTileSlope() instead of FindLandscapeHeightByTile() where ↵tron
it is sufficient. FindLandscapeHeightByTile() uses GetTileSlope() internally and adds some more info, which is discarded in these cases. While touching the code make a bit more clear how GetBridgeHeight() works.
2005-01-26(svn r1690) - Fix: [autoreplace] Cheaters can no longer exploit autoreplace ↵bjarni
to get vehicles, that's not invented yet - Fix: [autoreplace] Fixed a stupid bug introduced in r1687, that made a crash if anybody tried to autoreplace anything but an aircraft
2005-01-26(svn r1687) - Feature: [autoreplace] server now checks for ↵bjarni
plane<->helicopter replacement and reject replacement if needed
2005-01-25(svn r1676) Increase the size of TileIndex and TileIndexDiff to 32bits and ↵tron
adapt the save/load data and some other parts of the code to that change WARNING: If i made any mistake here it WILL lead to corrupted savegames!
2005-01-24(svn r1640) fix: now helicopters will use a hangar in schedule to be ↵bjarni
replaced in, even if they are only set to service there. Since helicopters are serviced at helipads, they will only go there if they needs to be replaced or renewed.
2005-01-23(svn r1629) added a counter to tell how many engines you have of each type ↵bjarni
to the autoreplace vehicle windows and made them show only the vehicles you actually have in the left list. this also fixes some window updates issues when autoreplacing
2005-01-23(svn r1612) -Fix: made sure that ->next pointers are set to NULLtruelight
2005-01-23(svn r1610) Remove trailing whitespace (last time ever, i hope)tron
2005-01-22(svn r1594) Convert all undefined parameter lists to (void) and add the ↵tron
appropriate warning flags in the Makefile
2005-01-21(svn r1583) -Fix: You should no longer be able to delete bridges on any type ↵darkvater
of underground when there is a vehicle on it
2005-01-19(svn r1569) -Fix: signed/unsigned mismatchdarkvater
2005-01-19(svn r1568) made an enum of train subtypes to make the code more readablebjarni
2005-01-19(svn r1564) ISO C90 forbids mixed declarations and code (bad bjarni, no cookie)tron
2005-01-19(svn r1563) fix: autoreplaced trains now sets wagon override properlybjarni
2005-01-18(svn r1561) Fix: autoreplacing a singleheaded engine into a dualheaded ↵bjarni
engine now adds the the rear engine autoreplacing a dualheaded engine into a singleheaded engine now sells the rear engine as a sideeffect of this, the price for replacing both engines are now added and displayed once from the depot(instead of two identical numbers written on top of each other, looking like one) fix: cost for autorenew dualheaded engines were doubled and their value where doubled too
2005-01-18(svn r1559) Use IsTileType() instead of bit shifting and comparisonstron
2005-01-16(svn r1538) -Feature: [988816] Disable servicing when breakdowns set to none ↵darkvater
(jaguar7)
2005-01-16(svn r1536) Move GET_TILEHEIGHT, GET_TILETYPE and IS_TILETYPE to map.h, turn ↵tron
them into inline functions and add some asserts
2005-01-15(svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.truelight
-Codechange: renamed all 'schedule' stuff to 'order(list)' -Codechange: moved all order-stuff to order_cmd.c / order.h -Codechange: vehicles that share orders are now linked to eachother with next_shared/prev_shared in Vehicle Developers: please use AssignOrder to assign data to an order. If not, you _WILL_ make the save-routine to assert!
2005-01-09(svn r1448) -Fix: The current_order of a vehicle is now correctly saved (caused truelight
massive desyncs) Warning: savegames which are made with the nightly of 08-01-2005 will NO LONGER work!!
2005-01-08(svn r1429) Change: bumped savegame to revision 5.truelight
- Now orders are bigger - Now _map2 is official 16 bits