|
Darkvater
|
r2436:963efe8b84cc
|
19 years ago
|
|
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters - change a lot of byte player types to PlayerID - beautify header files, same "#endif /* filename */" ending
|
|
Darkvater
|
r2425:5e48f18c7157
|
19 years ago
|
|
(svn r2951) - Fix: [ 1259345 ] Changing engine in netgame opens train window for everyone - Add IsLocalPlayer() which substitutes _local_player == _current_player
|
|
tron
|
r2360:8cc52b4a45df
|
19 years ago
|
|
|
|
ludde
|
r2261:e6fb9fd7ed61
|
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
|
|
celestar
|
r2214:59bf23688ead
|
19 years ago
|
|
|
|
tron
|
r2186:5ee653b1b5e1
|
19 years ago
|
|
|
|
tron
|
r2182:c25721cf181e
|
19 years ago
|
|
|
|
hackykid
|
r2164:bcdf63574138
|
19 years ago
|
|
|
|
tron
|
r2163:ae001e2aa5b0
|
19 years ago
|
|
|
|
tron
|
r2150:8d17c2dcd791
|
19 years ago
|
|
|
|
tron
|
r2140:efb49af98a17
|
19 years ago
|
|
|
|
Darkvater
|
r2135:c708b74d8b47
|
19 years ago
|
|
|
|
ludde
|
r2125:87ebf6378cb6
|
19 years ago
|
|
(svn r2635) Fix: [ntp/misc] Improve the old pathfinder. Changed it to A* instead of Dijkstra. - Benchmark shows that NTP is now around 10x faster than NPF. - Made IsTunnelTile macro to determine if a tile is a tunnel. - Added some useful debugging functions for making tiles red / getting accurate timestamps. - Remove old depot finding algorithm. - Disable warning for signed/unsigned comparisons.
|
|
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.
|
|
tron
|
r2049:7e26d55f0f4c
|
19 years ago
|
|
|
|
ludde
|
r2044:17a81bf31939
|
19 years ago
|
|
(svn r2553) - Fix: [pathfinding] Remove old-old train pathfinder. Enhanced old pathfinder. - Penalties for red signals and for slopes. - Increased the search depth to work better with large train networks.
|
|
celestar
|
r2032:28cb562e6cf0
|
19 years ago
|
|
(svn r2541) -Feature: Modified IsCompatibleRail so that an engine can move on more than one railtype (like Diesel engines on electrified rail). -Codechange: Use IsCompatibleRail where it should be used
|
|
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)
|
|
tron
|
r1998:57add07880e8
|
19 years ago
|
|
|
|
tron
|
r1986:40fe0be5bb1e
|
19 years ago
|
|
|
|
tron
|
r1980:3622a0cd06c2
|
19 years ago
|
|
|
|
tron
|
r1977:1f8b99c96041
|
19 years ago
|
|
|
|
celestar
|
r1969:287ecec5b3b7
|
19 years ago
|
|
|
|
hackykid
|
r1961:7949b074d614
|
19 years ago
|
|
|
|
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.
|
|
celestar
|
r1935:14189c6d6c9d
|
19 years ago
|
|
|
|
hackykid
|
r1934:c0ae769fa723
|
19 years ago
|
|
(svn r2440) - Fix: [newgrf] Fix the spritesorter to handle overlapping sprites properly, this fixes display problems with really short wagons. (algorithm by patchman, ported by therax) - Fix: [newgrf] Too short wagons could break the 'follow next vehicle' code used in the traincontroller. Clamp better to prevent this.
|
|
Darkvater
|
r1927:cc0ee71e209d
|
19 years ago
|
|
|
|
tron
|
r1926:ff7c3132a421
|
19 years ago
|
|
|
|
hackykid
|
r1925:db76bbf7e2c7
|
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
|
r1921:305bb198f333
|
19 years ago
|
|
|
|
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
|
r1909:f13697536803
|
19 years ago
|
|
|
|
hackykid
|
r1908:8c22d41a448a
|
19 years ago
|
|
|
|
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.
|
|
tron
|
r1901:e806afa50723
|
19 years ago
|
|
|
|
hackykid
|
r1895:9d45e93dd6b1
|
19 years ago
|
|
|
|
Darkvater
|
r1891:c5c5466afa35
|
19 years ago
|
|
|
|
hackykid
|
r1883:9315515934d3
|
19 years ago
|
|
(svn r2389) - Feature: [newgrf] Implement the mechanism for handling newgrf callbacks. - Feature: [newgrf] Implement the 'refit capacity' callback.
|
|
hackykid
|
r1882:b657f9bda5ce
|
19 years ago
|
|
|
|
hackykid
|
r1859:5fa354f6e5d6
|
19 years ago
|
|
(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.
|
|
Darkvater
|
r1842:b277f7aa17ea
|
19 years ago
|
|
|
|
Darkvater
|
r1802:acc0f0bda113
|
19 years ago
|
|
|
|
Darkvater
|
r1794:15e23047f8c1
|
19 years ago
|
|
(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.
|
|
Darkvater
|
r1790:aafbb2ff1ae7
|
19 years ago
|
|
|
|
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
|
r1784:15b805156766
|
19 years ago
|
|
(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)
|
|
Darkvater
|
r1779:3cedf5de23f3
|
19 years ago
|
|
|
|
matthijs
|
r1777:6d7bf202b4ef
|
19 years ago
|
|
(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.
|
|
Darkvater
|
r1770:37dc08d96840
|
19 years ago
|
|
|
|
Darkvater
|
r1766:32a7a0b6294b
|
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.
|
|
matthijs
|
r1698:8b26fad26105
|
19 years ago
|
|
|
|
tron
|
r1685:5080d72c6c66
|
20 years ago
|
|
(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
|
|
tron
|
r1684:9f21468fa919
|
20 years ago
|
|
|
|
tron
|
r1683:eccbfd1712c9
|
20 years ago
|
|
|
|
celestar
|
r1681:a66eba49be35
|
20 years ago
|
|
|
|
celestar
|
r1676:f80a89c80bf5
|
20 years ago
|
|
|
|
matthijs
|
r1675:bc2e4696dafb
|
20 years ago
|
|
|
|
pasky
|
r1615:6d516e05db7d
|
20 years ago
|
|
|
|
celestar
|
r1601:dd49342f28d8
|
20 years ago
|
|
|
|
truelight
|
r1554:5b10b362b3da
|
20 years ago
|
|
|
|
celestar
|
r1552:11ee6de84696
|
20 years ago
|
|
|
|
celestar
|
r1551:252aaa58b02a
|
20 years ago
|
|
|
|
truelight
|
r1542:6bae7041e7bc
|
20 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)
|
|
tron
|
r1531:d65d15f6dd48
|
20 years ago
|
|
(svn r2035) - Remove unneeded realloc() - Use TileOffsByDir() instead of home brewed table
|
|
celestar
|
r1530:c89d38477ba0
|
20 years ago
|
|
|
|
bjarni
|
r1520:9fa8c1f5f0f8
|
20 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)
|
|
darkvater
|
r1507:737dd01be3a2
|
20 years ago
|
|
|
|
tron
|
r1475:89b98bad154a
|
20 years ago
|
|
|
|
tron
|
r1472:37d3d69da4f7
|
20 years ago
|
|
|
|
matthijs
|
r1461:8958002bcd62
|
20 years ago
|
|
(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)
|
|
matthijs
|
r1459:5ad84cecccbb
|
20 years ago
|
|
(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
|
|
Celestar
|
r1455:6e289e92391e
|
20 years ago
|
|
|
|
pasky
|
r1443:9a8f64c33cbe
|
20 years ago
|
|
|
|
tron
|
r1438:e2c70c464475
|
20 years ago
|
|
|
|
tron
|
r1434:b9a13b8c79f4
|
20 years ago
|
|
|
|
tron
|
r1432:3002f37ab682
|
20 years ago
|
|
|
|
tron
|
r1431:d2a2b8f2882e
|
20 years ago
|
|
|
|
tron
|
r1430:7ca217f42998
|
20 years ago
|
|
|
|
Darkvater
|
r1418:eb7a29e7e0b9
|
20 years ago
|
|
|
|
tron
|
r1394:275bd5541bae
|
20 years ago
|
|
|
|
celestar
|
r1387:87d700a7ee55
|
20 years ago
|
|
|
|
tron
|
r1359:705db2bcef93
|
20 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
|
|
celestar
|
r1337:f65714b3e438
|
20 years ago
|
|
|
|
matthijs
|
r1330:62eaa061ec97
|
20 years ago
|
|
(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.
|
|
truelight
|
r1313:da473558c9d7
|
20 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
|
20 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
|
r1266:eab492937b2b
|
20 years ago
|
|
(svn r1770) -Fix: Hopefully last pieces of code that are containing a station-id (and should be an uint16, not uint8)
|
|
matthijs
|
r1247:d01094dbcdcc
|
20 years ago
|
|
(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().
|
|
tron
|
r1245:eb9b943bd917
|
20 years ago
|
|
|
|
bjarni
|
r1237:bcfd11754153
|
20 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
|
r1236:8463117fb763
|
20 years ago
|
|
|
|
darkvater
|
r1235:e5041bfe7f02
|
20 years ago
|
|
|
|
celestar
|
r1234:5ce95e7feae2
|
20 years ago
|
|
|