Commit Graph

62 Commits (cb1f1921f65ac6ad582c7387b8629c3b5391d9d7)

Author SHA1 Message Date
bjarni 879ca66041 (svn r1640) fix: now helicopters will use a hangar in schedule to be 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. 20 years ago
bjarni cf862380fc (svn r1629) added a counter to tell how many engines you have of each type 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
20 years ago
truelight b586a890f7 (svn r1612) -Fix: made sure that ->next pointers are set to NULL 20 years ago
tron 81ee2d931b (svn r1610) Remove trailing whitespace (last time ever, i hope) 20 years ago
tron 94d5aeabb2 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 20 years ago
darkvater 0d43eb3ab8 (svn r1583) -Fix: You should no longer be able to delete bridges on any type of underground when there is a vehicle on it 20 years ago
darkvater ada9fc873e (svn r1569) -Fix: signed/unsigned mismatch 20 years ago
bjarni 467e4b82bf (svn r1568) made an enum of train subtypes to make the code more readable 20 years ago
tron 654d75f795 (svn r1564) ISO C90 forbids mixed declarations and code (bad bjarni, no cookie) 20 years ago
bjarni 75863ee5cd (svn r1563) fix: autoreplaced trains now sets wagon override properly 20 years ago
bjarni 5f549396f4 (svn r1561) Fix: autoreplacing a singleheaded engine into a dualheaded 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
20 years ago
tron 0d85b92e43 (svn r1559) Use IsTileType() instead of bit shifting and comparisons 20 years ago
darkvater 0fc9b656e2 (svn r1538) -Feature: [988816] Disable servicing when breakdowns set to none (jaguar7) 20 years ago
tron 61a6bc544d (svn r1536) Move GET_TILEHEIGHT, GET_TILETYPE and IS_TILETYPE to map.h, turn them into inline functions and add some asserts 20 years ago
truelight 7cafdf3b0b (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
-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!
20 years ago
truelight 3e84b9781f (svn r1448) -Fix: The current_order of a vehicle is now correctly saved (caused
massive desyncs)
  Warning: savegames which are made with the nightly of 08-01-2005 will 
   NO LONGER work!!
20 years ago
truelight 95a879fb7d (svn r1429) Change: bumped savegame to revision 5.
- Now orders are bigger
   - Now _map2 is official 16 bits
20 years ago
bjarni 4068eba111 (svn r1427) fixed issue where the wrong sprite could be used if autoreplacing between single and multiheaded trains 20 years ago
truelight 1d9d128f65 (svn r1426) -Codechange: cleaned up the reference code in the saveload routines
-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
20 years ago
bjarni 2b6e6a3846 (svn r1421) improved autoreplace multiheaded trains. It now remembers the current heading for an engine instead of turning all of them like the first one and the last the other way 20 years ago
bjarni a6e7efd767 (svn r1419) fixed issue where autoreplacing dualheaded trains turned the last engine the wrong way 20 years ago
tron 414ac3286b (svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY] 20 years ago
celestar b2c47cf7d6 (svn r1412) -Feature/Fix: Aircraft refit options have been restricted to "sane"
values.
-Feature: aircraft can now be refitted "mail-only"
-Feature: Passengers aircraft now ignore the amount of mail for "full
load any" options
20 years ago
celestar 91bf7a7448 (svn r1410) Replaced all occurences of 'passanger' by 'passenger' in the code 20 years ago
truelight b450603437 (svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns 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 *.
20 years ago
tron 2eb7aedf69 (svn r1402) Trim trailing whitespace 20 years ago
bjarni 2492e7736e (svn r1393) fix [ 1096026 ]. Autorenew trains should now hopefully work like it did before autoreplace was added
DEREF_ENGINE is now used in autoreplace
20 years ago
bjarni 5704882186 (svn r1378) Fix: train engines are now only replaced if the engine is really set to be replaced and they are replaced to the type that engine type is set to be replaced to (instead of whtat the first engine in the train is set to) 20 years ago
bjarni 522d6b590c (svn r1376) fixed an issue where a modified client could try to replace a vehicle to an invalid engine ID and crash the server. Now the server just rejects the request. Also added a check for vehicle ownership, so you should not be able to replace other player's vehicles 20 years ago
darkvater fc52b512aa (svn r1375) -Fix: [1050990] Buying trains sometimes accounted for incorrectly. Was the result of the cost getting reset in a recursive call of docommand. That is fixed. In addition all cost-commands are typed explicitely. Please do not forget to do so or your costs will be credited to construction if you are unlucky. 20 years ago
bjarni 5da75918c0 (svn r1323) Adding autoreplace feature
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()
20 years ago
truelight 78cbe3f412 (svn r1300) -Fix: The cost for an autorenew was not always send to the right player ;) 20 years ago
miham 7bf7cf80ee (svn r1297) Language fixes in the source.. (ln-) 20 years ago
truelight 2f9e0b8e0c (svn r1288) -Codechange: changed _map2 to an uint16. It is still saved and 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!!
20 years ago
truelight c0eeb710c7 (svn r1283) -Add: AutoRenew is now a client-side patch instead of a 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.
20 years ago
darkvater 452db59121 (svn r1211) -Feature: Introduce sticky windows to all vehicle windows...Just 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 20 years ago
tron a148ff4e0d (svn r1117) Move map arrays and some related macros into their own files map.c and map.h 20 years ago
tron 03910ce7e9 (svn r1015) MFM r789
Replaced the slightly misleading SERVICE_INTERVAL by a function VehicleNeedsService()
20 years ago
tron 13e8d01dcb (svn r1009) -Feature: per-station vehicle lists
This adds a little button per vehicle class to the station window which opens a list of all vehicles that have this station on their schedule.
As side effect this gets rid of some global variables.
20 years ago
tron 6d49982286 (svn r1005) Don't treat orders in the normal load routine as old orders, this lead to corruption on load. 20 years ago
tron 752155b6ee (svn r1004) Fix harmless typo (comma instead of semicolon) 20 years ago
bjarni c6cd07e2e3 (svn r998) now vehicles are serviced both when entering and when leaving depots to prevent that vehicles might need service when leaving after a long stay (ln--) 20 years ago
tron 567ad3b5db (svn r990) Fix a display bug in the order list:
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.
20 years ago
darkvater 54d3f2aff3 (svn r957) -Fix: vehicle.c compiler problems for MSVC6 only! (Tron) 20 years ago
tron b8e83ca03f (svn r955) Replace uint16 for orders with struct Order
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.
20 years ago
truelight f16b4adfc5 (svn r948) -Codechange: clearified my last commit a bit more with some comment in the code 20 years ago
truelight 60bf102bd3 (svn r947) -Fix: [Network] Desync problem 20 years ago
truelight d6a1f3e412 (svn r942) -Merged branch/network back into the trunk 20 years ago
tron 291d25a88b (svn r925) Use sound enums
Also play the correct sound when a toyland road vehicle breaks down
20 years ago
tron ff7b0294b8 (svn r909) Small cleanup in vehicle.c, this should fix some warnings on 64bit machines 20 years ago