Commit Graph

239 Commits (0993ff118c3ff546ac7e05220942d569767d9166)

Author SHA1 Message Date
Darkvater b438b1248c (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 19 years ago
hackykid 351d7aaa9f (svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks.
- Feature: [newgrf] Implement the 'refit capacity' callback.
19 years ago
hackykid d1c1a7cba7 (svn r2388) - Fix: [realistic accel] Very slow trains no longer get an increase in maximum speed when part of them is in a depot. 19 years ago
hackykid d90948abb7 (svn r2365) - Change: [refitting] Make refitting capacities for trains newgrf compatible. Train vehicles can now carry twice as much mail/goods as other cargo, and four times as much passengers.
- Fix: [refitting] The refit window now shows the correct refit options for the entire consist. Only if at least one of the vehicles in the train can be refitted to a certain cargo, it is shown in the list.
 - Fix: [refitting] When refitting to a cargo which is already carried by some vehicles in the consist, the capacities of those vehicles are taken into account when calculating the new capacity of the train in the refit window.
19 years ago
Darkvater 9fb4b2ef55 (svn r2347) - Fix (regression): depot window did not get redrawn when a non-train-engine was sold. 19 years ago
Darkvater 5174d3adfe (svn r2306) - CodeChange: Check the last commands; refits. This needed an extensive rewrite and global/local-cargo ID juggling and bitmasking. However with this done it looks better as well and is compatible with newgrf handling. Big thanks to HackyKid for doing most of the work. This also closes patch "[ 1199277 ] Command checks" 19 years ago
Darkvater c626555f68 (svn r2298) - CodeChange: removed CmdAbuses: CmdSetTownNameType(), CmdStartNewGame(), CmdCreateScenario(), CmdSetNewLandscapeType() and CmdGenRandomNewGame().
- CodeChange: renamed CmdTrainGotoDepot() to CmdSendTrainToDepot() to be consistent with other depot commands.
- CodeChange: 'newgame' console command now calls the unabused GenRandomNewGame(). For the server it still creates a new game, a client quits the game and continues in SP.
- CodeChange: in the game-difficulty window, setup the disabled buttons on window creation, not every redraw.
19 years ago
Darkvater 729066e407 (svn r2294) - CodeChange: check the service interval settings when changing of all vehicle-types. To simplify things introduce GetServiceIntervalClamped() that returns the same or clamped value of the new service interval. There were some inconsistencies in the gui files so I had to change those, and const correctness kicked in, so it's a bit messy at certain points. 19 years ago
Darkvater 5e6923e936 (svn r2290) - CodeChange: protect the next batch of commands. This brings us to a total of 61, which is 53% :)
- CodeChange: To correctly accept engine-prototypes, the best-player checking has been moved to its own function, I hope it functions the same as before.
- CodeChange: Added symbolic types of PlayerID, OrderID and EngineID. For engines also added GetEngine() and IsEngineIndex(), similar to the other such functions.
- CodeChange: To correctly build industries, some tables have been moved to build_industry.h. The only way to find out currently if an industry is valid in a climate is by looping all industries and checking if it matches. Also to comply with the patch setting build_rawmaterial_industries, it is assumed that these industries do not accept any cargo of any type. This can and probably should changed in the future to some flag in their struct. Also use _opt_ptr instead of _opt.
- CodeChange: implemented the HQ checking code inspired by MarkR2 in "[ 1190944 ] Many commands not checked for security".  Unfortunately it is impossible to prevent only deleting a HQ by a modified client atm.
- CodeChange: For insert order and modify order their parameters are implicitely truncated to 8 bits, instead of the 16 bits said in the comments.
19 years ago
Darkvater ab954a934a (svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
- CodeChange: changed the airport gui airport-type checking. Added function GetValidAirports() that returns bitmasked availibility, is also used for checking.
- CodeChange: to check tree-planting, 2 const arrays have been moved to table/tree_land.h (type and count)
- CodeChange: added IsTownIndex() in following of IsStationIndex(), etc.
- Fix (regression): road tunnels did not work anymore, forgot that their type was 0x200 (documented now)
19 years ago
Darkvater 74671bd2c9 (svn r2283) - Fix (regression): [ 1197493 ] train_gui.c:1341: failed assertion ..., somehow RebuildVehicleList() got lost during the rewrite :P 19 years ago
matthijs 0e08878a68 (svn r2281) - Fix: [ 1115204 ] [NPF] When pressing the goto depot button, trains will now also look behind it if there is no depot in front. If so, the train reverses immediately. This also work anywhere, not just at stations.
- Add: [NPF] Reversing inside of depots now has a penalty. It also applies to trains only, other vehicles shouldn't bother reversing.
- Fix: [NPF] When checking whether to reverse a train, the trackdir of the first loc was used instead of the last vehicle as a starting node for pathfindig.
	This might have caused some trains not reversing when they should have (or vice versa). Typo introduced when converting to GetVehicleTrackdir() in r2256.
- CodeChange: [NPF] Removed duplicate code by letting NPFRouteTjoStationOrTile() call NPFRouteToStationOrTileTwoWay().
- Add: [NPF] NPFRouteToDepotBreadthFirstTwoWay() to find a depot while also looking backwards.
- Add: It is now possibly to specify a path cost for aystar starting nodes.
19 years ago
Darkvater adf929fef5 (svn r2274) - Codechange: some comments, parentheses and EngineID typedef for engine_type 19 years ago
Darkvater 203a84dd0b (svn r2270) - Fix/Codechange: fix up selling rail vehicles. Try to be smart about it. When selling dual-headed trains, also sell the rear end; if the now-first wagon is an engine, make it a train. When selling the whole train, try to leave dual-headed setups intact 19 years ago
matthijs 0699c54c45 (svn r2262) - Fix: Assertion when vehicle in a depot wants to do pathfinding.
GetVehicleTrackdir now tries to get a valid trackdir as much as possibly, by assuming that a vehicle is facing outwards in a depot or road station, for example.
- Codechange: [Multistop] Multistop now also tries to find a slot for road vehicles that are in stations, since the pathfinder now properly handles that.
19 years ago
matthijs 24943a4759 (svn r2261) - Fix: When crashed vehicles try to find a depot for servicing, openttd asserts.
Crashed vehicles shouldn't find depots anyway...
19 years ago
matthijs 6eb094c726 (svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)
- 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.
19 years ago
matthijs 4eeac3ea75 (svn r2202) - Fix: [NPF] When a vehicle could not reach its target, it would choose a random direction. It will now try to get as close as possible. 19 years ago
tron 02f5818912 (svn r2189) Introduce and use IsCompatibleTrainStationTile()
This should prevent trains, which are longer than the station, to turn around without stopping under certain circumstances and fix speed limit for trains entering a station, when realistic accerlation is used
19 years ago
tron 277d9d237b (svn r2188) Revert r2185, because trains always accerlated (Requested by Celestar) 19 years ago
tron e00785a855 (svn r2187) Implement a slightly better workaround than r1588 did. (Joint effort with Celestar) 19 years ago
celestar 4601cd1366 (svn r2185) -Fix: Made sure that the realistic acceleration does not freeze trains anymore 19 years ago
celestar a714444a8e (svn r2180) -Fix: Deceleration code now only takes into account rail station tiles for computing the remaining distance 20 years ago
matthijs 6409e6efaf (svn r2179) - Fix: [ 1121437, 1114228 ] Vehicles not entering depots for auto servicing. 20 years ago
pasky 2857b71214 (svn r2119) - Fix: [ 1172878 ] Trains "Go to depot" button: click twice skip to next order (patch by Loic GUILLOUX). I also added short explanation of OF_/OFB_ difference to order.h. 20 years ago
celestar c68cfdeeca (svn r2105) -Codechange: Added a cache for the first vehicle of a chain to increase performance, especially with many long trains 20 years ago
truelight 1eab014524 (svn r2058) -Fix: hopefully this fixes the reverse-train-in-depot-bugs (plural) 20 years ago
celestar 9cde836d08 (svn r2056) -Fix: [ 1166999 ] Strange cast removed. Thanks Tron 20 years ago
celestar 6e142d523e (svn r2055) -CodeChange: Begun introducting StationID 20 years ago
truelight 83637d164e (svn r2046) -Codechange: moved all waypoint code to waypoint.c/waypoint.h
-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)
20 years ago
tron b19553574e (svn r2035) - Remove unneeded realloc()
- Use TileOffsByDir() instead of home brewed table
20 years ago
celestar fbc2eacade (svn r2034) -Codechange: Replaced the rather meaningless LOAD and UNLOAD flags for depots by something more meaningful 20 years ago
bjarni acb1fb2e30 (svn r2024) -Fix: [autoreplace] reverted all changes involving 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)
20 years ago
darkvater cc99c3e262 (svn r2011) - Fix: [ 1162209 ] Fix OS/2 build (orudge) #2 20 years ago
tron e5121e70d0 (svn r1979) Const correctness 20 years ago
tron e6e3e69da4 (svn r1976) Cleanups - mostly indentation and fiddling with loops 20 years ago
matthijs 4206d8f955 (svn r1965) - Fix: [NPF] Forgot to update one line where NPFGetFlag() should have been used two commits ago.
Message for last commit should have been:
- Add: [NPF] Added penalty for curves, straighter paths are now preferred when the length is the same. (HackyKid)
20 years ago
matthijs 232e41f2ff (svn r1963) - Add: [NPF] Penalty for a red signal that is the last signal on the path.
- Add: [NPF] NPFGetFlag() and NPFSetFlag() to wrap NPF node flag handling
20 years ago
Celestar 7473cef063 (svn r1959) -Fix: Repaired two memleaks I have hacked :( 20 years ago
pasky a0c157eea8 (svn r1947) As in r1946, permit DC_QUERY_COST even on non-depot tiles - so that it works for the ai_new. It is de iure not a bug yet but let's be safe against future annoying headaches. Signed-Off-By: TrueLight 20 years ago
tron 2e3465cb49 (svn r1942) Fix r1938 20 years ago
tron aee2b0c50a (svn r1938) Miscellaneous cleanups: const correctness, kill a goto, ... 20 years ago
tron e748280622 (svn r1936) End some void-pointer-as-int-abuse; this also fixes a latent bug where a TileIndex was only 24bit wide (on 32bit architectures) 20 years ago
tron a4a09e73d5 (svn r1935) Missing braces; while here turn the ifs into a single switch 20 years ago
tron a747e2bb97 (svn r1934) Small cleanup (uint -> TileIndex, (uint)-1 -> INVALID_TILE and similar stuff) 20 years ago
Darkvater 232fffffac (svn r1922) - Fix: Disappearing of crashed trains inside tunnels were not checked properly. 20 years ago
tron 51eef8c5b7 (svn r1898) Remove some unused macros from macros.h and move some others to more appropriate headers 20 years ago
celestar d06f52a7f0 (svn r1891) -Fix: [ 1143587 ] carriages of newgrfs can be refitted again 20 years ago
tron 6b83a05ada (svn r1863) Give the effect vehicle type enums more descriptive names and use the enum as parameter type for CreateEffectVehicle*()
-Fix: [1116619] Generate the correct smoke type for diesel trains
20 years ago
celestar f758bd769b (svn r1841) -Fix: [ 1117538 ] non-stop orders are no longer accidently skipped 20 years ago
matthijs c5c5c9b17c (svn r1834) - Fix: NPF does not check the owner of its target, busses try to enter other players' depots. TODO
- Add: asserts to find the v->u.rail.track == 0 problem.
- Add: IsValidDepot(), IsValidTown(), IsValidSign(), IsValidVehicle(), IsValidStation()
- Add: GetTileOwner(), IsTileOwner()
- Codechange: Replaced IsShipDepotTile(), IsTrainDepotTile(), IsRoadDepotTile() by IsTileDepotType().
- Codechange: typedeffed the MAP_OWNERS as Owner. Should be used as variable type.
- Codechange: Replaced a few uint by TileIndex.
20 years ago
truelight e9c93f9c0c (svn r1817) -Codechange: Moved depot-functions to depot.c
-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)
20 years ago
truelight 97728357e4 (svn r1786) -Fix: unitnumber is increased to 16bit, so now you can have up 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)
20 years ago
truelight ab3ed5c431 (svn r1770) -Fix: Hopefully last pieces of code that are containing a station-id
(and should be an uint16, not uint8)
20 years ago
matthijs a2dec6c32a (svn r1751) - Feature: New PathFinder (NPF).
- Supports trains, road vehicles and ships.
	- Uses A* pathfinding (same codebase as the new ai).
	- Currently unlimited search depth, so might perform badly on large maps/networks (especially ships).
	- Will always find a route if there is one.
	- Allows custom penalties for obstacles to be set in openttd.cfg (npf_ values).
	- With NPF enabled, ships can have orders that are very far apart. Be careful, this will break (ships get lost) when the old pathfinder is used again.
- Feature: Disabling 90 degree turns for trains and ships.
	- Requires NPF to be enabled.
	- Ships and trains can no longer make weird 90 degree turns on tile borders.
- Codechange: Removed table/directions.h.
	- table/directions.h contained ugly static tables but was included more than once. The tables, along with a few new ones are in npf.[ch] now. Better suggestions for a location?
- Fix: Binary heap in queue.c did not allocate enough space, resulting in a segfault.
- Codechange: Rewritten FindFirstBit2x64, added KillFirstBit2x64.
- Codechange: Introduced constant INVALID_TILE, to replace the usage of 0 as an invalid tile. Also replaces TILE_WRAPPED.
- Codechange: Moved TileAddWrap() to map.[ch] 
- Add TileIndexDiffCByDir(), TileIndexDiffCByDir(). 
- Codechange: Moved IsTrainStationTile() to station.h
- Add: IsRoadStationTile() and GetRoadStationDir().
20 years ago
tron 7bbcf5875c (svn r1749) Move the functions which calculate distances to map.[ch] and give the more meaningful names 20 years ago
bjarni 73c0cc5203 (svn r1741) - Fix: added IsVehicleIndex() so it's possible to protect 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
20 years ago
celestar 94f6208bde (svn r1740) -Fix: [ 1112342 ] Realistic acceleration works properly with TTDPatch non-stop handling behaviour 20 years ago
darkvater 55e1eab1a2 (svn r1739) - Fix: type checking when selling vehicles (TrueLight) 20 years ago
celestar e3287ad303 (svn r1738) -Fix: [ 1108735 ] Fixed (hopefully) an assertion that was cause by selling carriages in a MP game faster than the network can handle. (Truelight) 20 years ago
bjarni 5987455d35 (svn r1727) - Fix: now CmdBuildRailVehicle() behaves correctly if DC_EXEC is set
this commit alters ai.c a little to get rid of the workaround from r1725 so AI players could still build locomotives
20 years ago
bjarni c16c7312cf (svn r1725) - Fix: now trains can only be built in depots and you have to own the depot too (hacked client protection) 20 years ago
tron 97ae59fe1a (svn r1718) Use the enum TileType as parameter/return type for [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.
20 years ago
tron 5885b31bb4 (svn r1713) Split off several functions which query/set information about a single tile from map.h and put them into a seperate file tile.h 20 years ago
bjarni 3b6901f7fd (svn r1712) - Fix: a hacked client can no longer send other players trains to a depot
- Feature: [autoreplace] trains now tries to find a depot if they needs to be replaced

Now all 4 types of vehicles goes to a depot if they needs to be replaced
20 years ago
tron 3e0dcfd47f (svn r1701) Style police ^^ 20 years ago
bjarni 99338d278d (svn r1700) - Fix: Hacked clients can no longer be used to build vehicles that are not available yet (Hackykid) 20 years ago
tron 63653bd6af (svn r1696) Use GetTileSlope() instead of FindLandscapeHeightByTile() where 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.
20 years ago
celestar efcd72a2ef (svn r1681) -Feature: New realistic acceleration.
This will make things more difficult as narrow curves
          and depots impose rather strict speed limits. Feedback welcome
          For those who don't like low-speed curves: Switch it off
20 years ago
tron 993a106679 (svn r1676) Increase the size of TileIndex and TileIndexDiff to 32bits and 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!
20 years ago
bjarni e006f89aa3 (svn r1652) Fix: train and road vehicle lists are now redrawn when vehicles enters/leaves a depot (Hackykid)
fix: the ship status bar was not updated properly after a breakdown if show_speed was off (Hackykid)
20 years ago
celestar ef3961448f (svn r1638) -Fix: Train crashes should no longer desync the game. This is more of a
workaround, as somewhere there might be some InteractiveRandom() abuse
in the code.
20 years ago
darkvater a9e789fa02 (svn r1633) -Fix: [1040119] Flood and wagons in depot 20 years ago
bjarni 6510b12203 (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
tron 44f48ce915 (svn r1610) Remove trailing whitespace (last time ever, i hope) 20 years ago
dominik 322bd934be (svn r1604) Fix: [ 1105112 ] Destroyed train locks crossings 20 years ago
tron e5cd6b6193 (svn r1596) Add some more statics 20 years ago
tron 189ca73707 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 20 years ago
celestar f40ff3c134 (svn r1588) -Fix: [ 1105959 ] coded a workaround in the acceleration code so that
trains don't think they're on a slope while they drive around in a
tunnel
20 years ago
bjarni 2fd3553d78 (svn r1568) made an enum of train subtypes to make the code more readable 20 years ago
celestar 941da5dc94 (svn r1565) -Fix: [ 1104969 ] Aircraft in hangar messages are now revalidated before
display
-CodeChange: replaced one if (foo) return true else return false by
return (foo)
20 years ago
bjarni b1c4b0f07d (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
Celestar 389a4bf44d (svn r1558) -Fix: [ 1104350 ] Crashed trains do not initiate the lost vehicle
message anymore
20 years ago
celestar e0471187d0 (svn r1554) -Fix: [ 1103187 ] Order Check messages are now validated before
displayed, so that there are no stray error messages any more.
-Feature/Fix: Order Checking is only execute for ONE vehicle in an
order-share system
20 years ago
tron 5adad6c1b4 (svn r1550) Remove useless function declaration 20 years ago
tron fb0c3c8061 (svn r1549) Clean up some functions:
uint tile -> TileIndex tile
if () cascade -> switch ()
20 years ago
tron ae796740aa (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 d275109e79 (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 32f480a4ae (svn r1445) -Fix: reversing a train also reverses the UP and DOWN status for 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
20 years ago
tron 7ca6b2b8b0 (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
truelight 63e97754fb (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 8b7c1e94e1 (svn r1402) Trim trailing whitespace 20 years ago
tron 67161506ad (svn r1386) Move TileIndexDiff to map.h
Move _tileoffs_by_dir to map.[ch] and encapsulate it in TileOffsByDir()
20 years ago
darkvater 6edb21231e (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
matthijs a9b3d8c998 (svn r1367) -Fix: Full-Loading trains no longer get "lost" after a while (Hackykid) 20 years ago
bjarni 29d8c5bb50 (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 c2ee8d70e4 (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 8dcbf2675b (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 160a0a5ee1 (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
truelight d8709b18c6 (svn r1200) -Fix: Fixed bug pointed out by Tron: when a train is on the
road/rail-crossing, and you let an other train drive towards it, reverse 
it, the lights no longer go off.
20 years ago
truelight 8ee37e7b47 (svn r1199) -Fix: [ 958098 ] No longer road/rail crossing signals hang when a train
is reversed at the wrong moment (Yeah, our longest open bug finally 
fixed :) :) :))
20 years ago
truelight 24853eb42c (svn r1198) -Fix: [ 1087701 ] It is no longer possible to crash trains of other
companies by building a depot close to a station. (even more: trains do 
no longer enter tiles that do not belong to his owner)
20 years ago
tron 3bbea05a93 (svn r1189) Fix vehicle list update glitch when moving waggons in depots 20 years ago
dominik bb5dca016d (svn r1167) Feature: Added the possibility to add validation functions to NewsItems. This is now done for "Train in depot" messages. Before displaying such a message, it checks if the train really still is in the depot. Can be applied to other news items as well. 20 years ago
tron 765ecfed84 (svn r1117) Move map arrays and some related macros into their own files map.c and map.h 20 years ago
tron 0ba5123cef (svn r1015) MFM r789
Replaced the slightly misleading SERVICE_INTERVAL by a function VehicleNeedsService()
20 years ago
tron 5b0915e677 (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
bjarni 02bf3ed5c0 (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 7c2448ecea (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
tron e56c3cddd8 (svn r925) Use sound enums
Also play the correct sound when a toyland road vehicle breaks down
20 years ago
tron d036559e0e (svn r924) Use RailVehInfo() instead of &_rail_vehicle_info[] 20 years ago
tron fdb447ac55 (svn r901) Small step in the process to clean up the DPARAM mess:
- reduce to 2 sizes (*DParam64 for 64bit values, *DParam for the rest)
- use inline functions instead of macros
- add assert()s to check for buffer overruns
20 years ago
tron acbd1801c7 (svn r815) Include strings.h only in the files which need it.
This should reduce the compile time after altering english.txt by about 1/3, because "only" 62 instead of 90 .c files must be recompiled.
20 years ago
tron 0b3cceb21d (svn r785) -Fix: A train can leave and enter the same depot at the same time, then the trai simply got stuck 20 years ago
pasky 2214a9df5c (svn r773) When refitting a train engine, refit also all the attached wagons which can be refitted (applicable to DBSetXL, as shown in http://pasky.or.cz/~pasky/dev/openttd/screenshots/wagrefit.png). This is how TTDPatch does it, pointed out by Bjarni. 20 years ago
tron 13f0b6c0cf (svn r654) Hopefully complete support for randomized variational spritegroups (i.e. the cars transporter in DBSetXL gets different cars each time) (pasky) 20 years ago
tron 249a170ace (svn r607) -Patch: [ 985102 ] static cleanup
Thanks to lvoge
20 years ago
darkvater 397cc50f61 (svn r587) -newgrf: Rename all /Checkpoint/i tokens to 'Waypoint's. The name actually makes some sense and is also compatible with TTDPatch (pasky). 20 years ago
darkvater e7441c39e3 (svn r546) -newgrf: Use GetCustomVehicleIcon() for fetching sprites for vehicle selection dialogs. (Idea by octo, done by pasky). 20 years ago
tron d641175e3c (svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
This includes 2 fixes
-Fix: [1048596] Monorail and Maglev sounds are swapped (r511)
-Add special case to load the jackhammer sound (r478)
The rest are cleanups und enumeration to make merging possible/easier
20 years ago
darkvater 36f18e7f40 (svn r314) -Fix: [982611] Pathfinding bug; train likes the roundabout. If train needs servicing it will now look 16 tiles along the track instead of 12 tiles manhattan style (blathijs) 20 years ago
darkvater 475ef74ab7 (svn r306) -Fix: [985439] un-owned rail. Trains could cross competitor's tracks if there was a road-crossing over it. 20 years ago
darkvater 089a2a7847 (svn r294) -Fix: autorail always builds rail, instead of occasional rail removal (on pressing hotkey after pressing 'bulldozer')
-Fix: network fixes (Tron)
-Some textfile changes, mainly URL's
20 years ago
darkvater 4757c0bf8c (svn r245) -Fix: [1022689] Bug when dragging a part of a multiheaded engine to 'sell-whole-train'. The rear-head of the multiheaded train will now not be sold automatically. You have to drag it manually (Celestar) 20 years ago
signde 5e699ca65d (svn r243) -Fix: [1022689] When destroying a part of a train with a 2 side engine the second engine was also deleted [Celestar] 20 years ago
truelight eb49a19460 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way! 20 years ago
truelight d2dd128b0d (svn r167) -Fix: [972247] bug in '[a] weird non-uniform stations handling'
(blathijs)
20 years ago
darkvater bf0652d3fc (svn r165) -Feature: Option to sort vehicles in vehicle-list window by 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.
20 years ago
truelight 10d54ac604 (svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
-Fix: some minor fixes around GetTileTrackStatus (blathijs)
20 years ago
darkvater 85628544ee (svn r157) -Feature: [1009708] Percent-based service intervals. Send a vehicle to depot after it has lost X% of its reliability (mivlad) 20 years ago
dominik c7baa9b10a (svn r104) Fix: wrong pathfinding when northern station tile is missing (blathijs) 20 years ago
dominik e1d92ebcc9 (svn r99) Fix: [992726] No tunnel crash (Celestar) 20 years ago
truelight 4b919416a2 (svn r77) -Fix: [1010788] AI service interval bug (tnx truesatan)
-Add: AI overrides service interval to 180 days
-Fix: AI hanged when all vehicles were disabled in Patch menu
20 years ago
truelight 4e3ad7598f (svn r74) -Fix: [1009631] Wrong multihead selling (Bodewes) 20 years ago
darkvater f422014960 (svn r23) -Some omments on the code (blathijs) 20 years ago
dominik 6f8e7943c5 (svn r20) Feature: warning when a vehicle has invalid orders (celestar) 20 years ago
dominik 9c4abb643c (svn r16) Fix: Train refit cost based on _price.ship_base 20 years ago
dominik a9413b12a2 (svn r12) Change: removed patch no_train_service. Instead you can set the default service interval for any vehicle type to 'disabled'. 20 years ago
truelight efaeb275f7 (svn r1) Import of revision 975 of old (crashed) SVN 20 years ago