summaryrefslogtreecommitdiff
path: root/vehicle.h
AgeCommit message (Collapse)Author
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-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-22(svn r1594) Convert all undefined parameter lists to (void) and add the ↵tron
appropriate warning flags in the Makefile
2005-01-19(svn r1568) made an enum of train subtypes to make the code more readablebjarni
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 r1556) -Fix: Vehicle list updates should now really workCelestar
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-15(svn r1521) -Fix: Ship Vehicle Lists are now redrawn correctlycelestar
-Codechange: added some const to last commit -Codechange: Ship and Aircraft lists are now update on order change, not on new day
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-09(svn r1445) -Fix: reversing a train also reverses the UP and DOWN status for ↵truelight
the realistic acceleration calculation -Fix: there was a big bug in setting the UP and DOWN flags making it easy possible for a overloaded train to go up a mountain. This is no longer possible. They will hang at a certain height
2005-01-08(svn r1429) Change: bumped savegame to revision 5.truelight
- Now orders are bigger - Now _map2 is official 16 bits
2005-01-08(svn r1426) -Codechange: cleaned up the reference code in the saveload routinestruelight
-Codechange: removed next_in_chain_old, and saved ->next for Vehicles (and bumped savegame revision for that to version 4.4) -Codechange: Added _sl.full_version, which has both major and minor version
2005-01-06(svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns ↵truelight
and _industries (in prepare of dynamic arrays): - DEREF_XXX is changed into GetXXX - All direct call are directed via GetXXX - struct Industry has now an index-field - ENUM'd some stuff - Replaced home built loops with FOR_ALL_XXX - Added _stations_size, _vehicles_size, ... which gives the length of the array (which will be dynamic in the near future) - Changed lengtof(XXX) to _XXX_size (e.g. _stations_size) - Removed all endof(XXX) (because mostly it was part of a FOR_ALL_XXX) - Made the sort-functions of all 4 dynamic - Made all 4 Initialize functions more of the same - Some minor tab-fixing and stuff (tnx to Tron for proof-reading my 100kb patch ;)) Note for all: please do NOT directly call _stations, _vehicles, _towns and _industries, but use the right wrapper to access them. Thank you. Ps: please also do not use 'v++', where v is of type Vehicle *.
2005-01-03(svn r1330) Increase size of some vars from int16 to int32 to guard against ↵tron
future overflows
2005-01-02(svn r1323) Adding autoreplace featurebjarni
This feature works much like autorenew, but it will get you a new engine type instead of a new one of the same type. Once ordered, it will automatically replace the engines while they visits a depot. The GUI for setting this up have been added on the vehicle overview windows Note: autorenew is now autoreplace, but to the same engine type Nice new features, that was added to make this possible - windows can now have two independant vertical scrollbars - CMD_SHOW_NO_ERROR have been added as a flag for DoCommandP. It will make it do the action instead of showing the red box with estimated costs even if shift is pressed - fixed problem where enginetypes where not initialized when loading a game. It's now done in InitializeGame()
2004-12-28(svn r1288) -Codechange: changed _map2 to an uint16. It is still saved and ↵truelight
loaded as an uint8 till the savegame version is bumped to version 5. Then it works automaticly as a fully uint16. So _stations[] can not be increased till after the bump!!
2004-12-27(svn r1283) -Add: AutoRenew is now a client-side patch instead of a ↵truelight
game-side patch Note: this is the first commit that breaks compatibility with 0.3.5! -Fix: Bufferoverflow with autorenew_money. It is now a 32-bit integer.
2004-12-21(svn r1211) -Feature: Introduce sticky windows to all vehicle windows...Just ↵darkvater
make sure you do not sticky more than 23 at a time. Also a lot of places in the code invalidated the 'status bar' of the vehicle, referring to it as widget 4. This is now widget 5 and has been #definitized
2004-12-11(svn r1015) MFM r789tron
Replaced the slightly misleading SERVICE_INTERVAL by a function VehicleNeedsService()
2004-12-09(svn r998) now vehicles are serviced both when entering and when leaving ↵bjarni
depots to prevent that vehicles might need service when leaving after a long stay (ln--)
2004-12-09(svn r990) Fix a display bug in the order list:tron
TTD stores invalid orders different than OTTD, this resulted in empty lines in the order list. With the overhaul of the order system this got worse: no line was shown at all. Fix this by sanity checking while loading and convert the orders accordingly.
2004-12-08(svn r978) Fixed an endianess issue with the new Order system. Thanks to ↵Celestar
Bjarni, Oskar and Tron
2004-12-05(svn r955) Replace uint16 for orders with struct Ordertron
This adds no functionality, but is a stepping stone for future improvement (like 16bit order indices) and is easier to read. This changes preserves binary compatibility wrt savegames.
2004-11-17(svn r654) Hopefully complete support for randomized variational ↵tron
spritegroups (i.e. the cars transporter in DBSetXL gets different cars each time) (pasky)
2004-11-14(svn r587) -newgrf: Rename all /Checkpoint/i tokens to 'Waypoint's. The name ↵darkvater
actually makes some sense and is also compatible with TTDPatch (pasky).
2004-09-10(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!truelight
2004-09-06(svn r165) -Feature: Option to sort vehicles in vehicle-list window by ↵darkvater
different criteria. Total independent sort for all types and players. Periodic resort of list every 10 TTD days. Thank you for your graphical inspiration follow and buxo (since none of you provided any code). -Fix: Sorter icon pointing down 'v' sorts in every window lowest value first, '^' highest value first -CodeChange: move Dropdownlist from settings_gui.c to widget.c. More in place there.
2004-09-04(svn r157) -Feature: [1009708] Percent-based service intervals. Send a ↵darkvater
vehicle to depot after it has lost X% of its reliability (mivlad)
2004-08-11(svn r23) -Some omments on the code (blathijs)darkvater
2004-08-11(svn r20) Feature: warning when a vehicle has invalid orders (celestar)dominik
2004-08-09(svn r1) Import of revision 975 of old (crashed) SVNtruelight