|
bjarni
|
r2259:11c885ee4192
|
19 years ago
|
|
|
|
bjarni
|
r2244:0a45bb36cb48
|
19 years ago
|
|
(svn r2764) -Feature: Clone vehicles -This allows a player to clone an excisting vehicle of his own -[fix]: this uncovered an excisting bug in CmdBuildRailVehicle() where depots could build trains of the wrong track type. This is fixed -Thanks to Celestar for drawing the sprites and _luca_ for including them in openttd.grf
|
|
tron
|
r2186:5ee653b1b5e1
|
19 years ago
|
|
|
|
tron
|
r2163:ae001e2aa5b0
|
19 years ago
|
|
|
|
celestar
|
r2148:f279899fdbd0
|
19 years ago
|
|
|
|
tron
|
r2140:efb49af98a17
|
19 years ago
|
|
|
|
tron
|
r2116:ddc2d73f5c38
|
19 years ago
|
|
|
|
hackykid
|
r2115:556698050edb
|
19 years ago
|
|
(svn r2625) - Fix: [pbs] Store the end of a train's reserved path explicitly. Prevents trains from unreserving eachothers paths in some cases. - CodeChange: Use the TrackdirToTrack function instead of &7, and remove an unneeded variable.
|
|
ludde
|
r2090:5edbac8240a5
|
19 years ago
|
|
|
|
tron
|
r2049:7e26d55f0f4c
|
19 years ago
|
|
|
|
hackykid
|
r2008:5e435ad4c8e4
|
19 years ago
|
|
(svn r2516) - Feature: [pbs] Implement path-based-signalling. This allows multiple trains within the same signal block, provided their paths dont intersect. For this the block must have all exit and entry signals be pbs signals. Place these by ctrl-clicking 4 times on a normal signal. - Feature: [pbs] Implement autoplacement of pbs blocks, when a block has an entry and an exit pbs signal, covert the entire block to pbs. Can be turned off in the patch settings. - Feature: [pbs] Allow showing of reserved status by making the tracks darker, when the pbs debug level is at least 1.
|
|
matthijs
|
r2006:bc0d47d1f3f0
|
19 years ago
|
|
(svn r2514) - Codechange: [NPF] Move the checking of railtype into a funciton IsCompatibleRail(). - Codechange: [NPF] Check the railtype along a route against the engine type instead of against the previouse tile. This clears the way for electriefied rails. - Add: [NPF] [ 1209644 ] A penalty for crossings (peter1138)
|
|
celestar
|
r1985:67e1846c4c39
|
19 years ago
|
|
(svn r2491) -Fix: Solved a performance problem introduced in r2467. While busy committing, restore the sort order in the Makefile
|
|
tron
|
r1980:3622a0cd06c2
|
19 years ago
|
|
|
|
tron
|
r1977:1f8b99c96041
|
19 years ago
|
|
|
|
celestar
|
r1962:cc4c06e3f6b5
|
19 years ago
|
|
|
|
tron
|
r1959:c5a6f024dd5d
|
19 years ago
|
|
|
|
matthijs
|
r1944:ed1b90ae1557
|
19 years ago
|
|
(svn r2450) * Codechange: Replaced all uses of the arrays in tile.h with calls to the associated wrapper functions. * Codechange: Made npf.c use some map array accessing wrappers instead of direct access. * Codechange/Fix: Named every enum in tile.h. Fixes a nasty bug on MSVC where arrays would be initialised with zeroes (tnx Asterix_) * Removed magic numbers from tables in tile.c. * Added some explicit casts in tile.h.
|
|
matthijs
|
r1942:ea8e39498c72
|
19 years ago
|
|
(svn r2448) General cleanup of rail related code, more to follow. * Add: rail.[ch] for rail-related enums and wrapper functions. * Codechange: Removed dozens of magic numbers with below enums. * Codechange: Rewrote CheckTrackCombination(). * Add: TILE_SIZE, TILE_PIXELS and TILE_HEIGHT constants. * Add: enums RailTileType, RailTileSubtype, SignalType to mask against the map arrays. * Add: enums Track, TrackBits, Trackdir, TrackdirBits for railway track data. (Note that the old RAIL_BIT constants are replaced by TRACK_BIT ones). * Add: enums Direction and DiagDirection * Codechange: Moved a bunch of track(dir) related lookup arrays from npf.[ch] to rail.[ch]. * Codechange: move RailType enum from tile.h to rail.h. * Add: Wrapper functions for masking signal status in the map arrays: SignalAlongTrackdir, SignalAgainstTrackdir and SignalOnTrack. * Add: Wrapper functions to access rail tiles, using above enums * Add: Wrapper functions to modify tracks, trackdirs, directions, etc. * Add: Wrapper functions for all lookup arrays in rail.[ch] (Arrays are still used in parts of the code) * Codechange: Renamed some variables and arguments to better represent what they contain (railbit -> track, bits -> trackdirbits, etc.). * Codechange: Don't use FindLandscapeHeight() in CmdRemoveSingleRail(), since it returns way too much info. Use GetTileSlope() instead. * Codechange: [NPF] Removed some unused globals and code from npf.c.
|
|
tron
|
r1926:ff7c3132a421
|
19 years ago
|
|
|
|
hackykid
|
r1922:d5634e2fe7b3
|
19 years ago
|
|
(svn r2428) - Feature: [newgrf] Implement shorter train vehicles (Therax), and the callback that goes with it. - Codechange: Remove some magic numbers (PALETTE_CRASH)
|
|
hackykid
|
r1917:37ea487ce1c2
|
19 years ago
|
|
(svn r2423) - CodeChange: Include first_engine in the train cache, instead of calculating it all over the place. - Fix: Also recalculate the train cache values for 'wagon chains' (in the depot without an engine), to avoid possible desyncs later. - Fix: Make CmdMoveRailVehicle update the caches of the correct trains in all cases.
|
|
hackykid
|
r1905:02a9c25dac91
|
19 years ago
|
|
(svn r2411) - Codechange: Have trains cache stuff like consist power/weight/max speed instead of recalculating it each time. - Fix: Station ratings now depends on the max speed of a consist, without being affected by other speed limits from realistic acceleration.
|
|
Darkvater
|
r1891:c5c5466afa35
|
19 years ago
|
|
|
|
Darkvater
|
r1881:ce1fe6a2816a
|
19 years ago
|
|
(svn r2387) - CodeChange: made the saveload code more readable and also removed the 'byte' saveload arrays which means you can save an array of more than 255 elements, or bigger structs than 255 bytes. This doesn't yet solve the problem that a chunk can be a maximum of 16384 big. - Fix: also fix an unnoticed error in SlSaveLoadConv() due to wrong types.
|
|
Darkvater
|
r1840:bb2cac1af441
|
19 years ago
|
|
|
|
tron
|
r1820:335b057adac7
|
19 years ago
|
|
|
|
Darkvater
|
r1802:acc0f0bda113
|
19 years ago
|
|
|
|
Darkvater
|
r1796:4bbf4ea0805e
|
19 years ago
|
|
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands. - CodeChange: remove cmd-misuses CmdStartScenario() and CmdDestroyCompanyHQ() - Fix (invisible): when parameter checking CmdRestoreOrderIndex() the vehicle did not have its orders yet, so it would fail. So move doing this until AFTER the orders have been added back in RestoreVehicleOrders()
|
|
Darkvater
|
r1793:7bff71353e69
|
19 years ago
|
|
(svn r2297) - CodeChange: server-check the next batch of commands. - CodeChange: since only the server will be able to modify difficulty settings, leave the checking of correct values besides, and trust users will join legit servers. - CodeChange: for renaming signs, only check if GetDParam(); eg _decode_parameters is empty ('\0') or not, instead of the extra check of players, etc. That basically does the same thing. Also dirty sign two times when renaming, once before, once after the action. Because if the name becomes shorter and you update only after, garbage remains on the screen. - CodeChange: made GetMaskOfTownActions() available to the town-cmd to double-check if the action was available to the player. For this purpose the hardcoded _local_player has been removed from the function and is now passed as a parameter.
|
|
Darkvater
|
r1786:f4dff9cc496a
|
19 years ago
|
|
(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.
|
|
Darkvater
|
r1765:451413baaf31
|
19 years ago
|
|
|
|
matthijs
|
r1758:5eb360df62a3
|
19 years ago
|
|
(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.
|
|
matthijs
|
r1757:b34f78174975
|
19 years ago
|
|
(svn r2261) - Fix: When crashed vehicles try to find a depot for servicing, openttd asserts. Crashed vehicles shouldn't find depots anyway...
|
|
matthijs
|
r1752:e339152fbe8d
|
19 years ago
|
|
(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.
|
|
bjarni
|
r1735:bc1e9f4091e2
|
19 years ago
|
|
(svn r2239) -Fix [autoreplace]: [ 1185653 ] autoreplacing a dualheaded 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
|
|
bjarni
|
r1663:72a3f2e06f18
|
19 years ago
|
|
(svn r2167) -fix: [autoreplace] trains now get the default cargo type if the engine replaced from did not have cargo capacity (instead of refitting to passengers)
|
|
truelight
|
r1652:935cb0ece8a9
|
19 years ago
|
|
(svn r2156) -Fix: in revision 2104 someone forgot to add a very important 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!
|
|
bjarni
|
r1635:25346e0600c7
|
19 years ago
|
|
(svn r2139) -fix: "[ 1146215 ] Engine power not updated w/auto replace" 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
|
|
truelight
|
r1605:391bb94dd2d3
|
19 years ago
|
|
|
|
celestar
|
r1601:dd49342f28d8
|
19 years ago
|
|
|
|
tron
|
r1600:ae1052bceb25
|
19 years ago
|
|
|
|
truelight
|
r1542:6bae7041e7bc
|
19 years ago
|
|
(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)
|
|
truelight
|
r1541:85051e08151f
|
19 years ago
|
|
(svn r2045) -Fix: hopefully fixed the desync problem. Please all test this revision!! (with tnx to Celestar, Hackykid, dp-_ and Tron)
|
|
truelight
|
r1537:060bed3865f5
|
19 years ago
|
|
|
|
bjarni
|
r1520:9fa8c1f5f0f8
|
19 years ago
|
|
(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)
|
|
tron
|
r1475:89b98bad154a
|
19 years ago
|
|
|
|
tron
|
r1394:275bd5541bae
|
19 years ago
|
|
|
|
tron
|
r1371:aac88cf2cbbf
|
19 years ago
|
|
|
|
tron
|
r1365:0e62079bd195
|
19 years ago
|
|
(svn r1869) Fix some bugs in the bulldozer movement implementation. Now they move in a sane pattern.
|
|
tron
|
r1364:0d7e9e71f661
|
19 years ago
|
|
|
|
tron
|
r1359:705db2bcef93
|
19 years ago
|
|
(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
|
|
tron
|
r1349:8fc4bdf6c588
|
19 years ago
|
|
|
|
tron
|
r1328:7f615de66cc5
|
19 years ago
|
|
|
|
truelight
|
r1313:da473558c9d7
|
19 years ago
|
|
(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)
|
|
truelight
|
r1282:086fc2f1272e
|
19 years ago
|
|
(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)
|
|
truelight
|
r1279:220466f197f1
|
19 years ago
|
|
|
|
truelight
|
r1266:eab492937b2b
|
19 years ago
|
|
(svn r1770) -Fix: Hopefully last pieces of code that are containing a station-id (and should be an uint16, not uint8)
|
|
bjarni
|
r1237:bcfd11754153
|
19 years ago
|
|
(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
|
|
celestar
|
r1217:1f9b7fc00eb8
|
19 years ago
|
|
(svn r1721) -Feature: It is now possible to build multiple road stations (up 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.
|
|
tron
|
r1214:2ed99b1b4b97
|
19 years ago
|
|
(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.
|
|
tron
|
r1209:5955f8748394
|
19 years ago
|
|
|
|
tron
|
r1192:f3272e78ae02
|
19 years ago
|
|
(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.
|
|
bjarni
|
r1187:a7e7bc855e24
|
19 years ago
|
|
(svn r1690) - Fix: [autoreplace] Cheaters can no longer exploit autoreplace 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
|
|
bjarni
|
r1185:a37b0493cf5e
|
19 years ago
|
|
|
|
tron
|
r1174:4ffa62f5467c
|
19 years ago
|
|
(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!
|
|
bjarni
|
r1139:4d22fb39f318
|
19 years ago
|
|
|
|
bjarni
|
r1128:d0dd5c69c2e5
|
19 years ago
|
|
(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
|
|
truelight
|
r1111:39ac8836ceda
|
19 years ago
|
|
|
|
tron
|
r1109:6c0cc4a443a2
|
19 years ago
|
|
|
|
tron
|
r1093:18f56ef2d029
|
19 years ago
|
|
|
|
darkvater
|
r1082:5511b4ed9376
|
19 years ago
|
|
|
|
darkvater
|
r1068:da82d0069863
|
19 years ago
|
|
|
|
bjarni
|
r1067:2a7fac5cf25c
|
19 years ago
|
|
|
|
tron
|
r1063:64988ee601b9
|
20 years ago
|
|
|
|
bjarni
|
r1062:fdde79eb73b7
|
20 years ago
|
|
|
|
bjarni
|
r1060:0d48734e0533
|
20 years ago
|
|
(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
|
|
tron
|
r1058:c32d04c0e105
|
20 years ago
|
|
|
|
darkvater
|
r1037:e6afad772171
|
20 years ago
|
|
|
|
tron
|
r1035:d35ec5ea5f73
|
20 years ago
|
|
|
|
truelight
|
r1024:c7c4672d839e
|
20 years ago
|
|
(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!
|
|
truelight
|
r956:9c9bd017ee7e
|
20 years ago
|
|
(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!!
|
|
truelight
|
r941:6916898da19b
|
20 years ago
|
|
(svn r1429) Change: bumped savegame to revision 5. - Now orders are bigger - Now _map2 is official 16 bits
|
|
bjarni
|
r939:e6498267fc9f
|
20 years ago
|
|
|
|
truelight
|
r938:19954e496620
|
20 years ago
|
|
(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
|
|
bjarni
|
r933:03d8553305f2
|
20 years ago
|
|
|
|
bjarni
|
r931:5cdc967cf86e
|
20 years ago
|
|
|
|
tron
|
r926:fcf36609eb94
|
20 years ago
|
|
|
|
celestar
|
r924:d1304efa7d2b
|
20 years ago
|
|
(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
|
|
celestar
|
r922:c6224817ada1
|
20 years ago
|
|
|
|
truelight
|
r919:57ef81f1ba8e
|
20 years ago
|
|
(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 *.
|
|
tron
|
r915:dabba47e3ed1
|
20 years ago
|
|
|
|
bjarni
|
r907:417161345514
|
20 years ago
|
|
(svn r1393) fix [ 1096026 ]. Autorenew trains should now hopefully work like it did before autoreplace was added DEREF_ENGINE is now used in autoreplace
|
|
bjarni
|
r892:524ac20bff15
|
20 years ago
|
|
|
|
bjarni
|
r890:6c6d68bed021
|
20 years ago
|
|
|
|
darkvater
|
r889:ed9a6e2f24bb
|
20 years ago
|
|
|
|
bjarni
|
r842:96908cec3367
|
20 years ago
|
|
(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()
|
|
truelight
|
r829:c20991eb0b98
|
20 years ago
|
|
|
|
miham
|
r826:aad8f888bce1
|
20 years ago
|
|
|
|
truelight
|
r817:5620a6b29ae5
|
20 years ago
|
|
(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!!
|