|
bjarni
|
r2567:a475d65e5a9c
|
19 years ago
|
|
|
|
bjarni
|
r2564:f7dd789275f9
|
19 years ago
|
|
(svn r3101) -Codechange: added _new_vehicle_id this var works like _new_train_id and the rest of that kind of vars, except it is set each time a vehicle is build, nomatter what type this is a nice tool to code vehicle independent code, which in turn can reduce code duplication Right now it's used in ReplaceVehicle() and CmdCloneVehicle()
|
|
tron
|
r2561:bff0d1890738
|
19 years ago
|
|
|
|
bjarni
|
r2552:89bd3d50b470
|
19 years ago
|
|
(svn r3081) -Codechange: [autoreplace] complete rewrite of autoreplace this is a complete rewrite, that makes use of existing commands like build and sell this means that multiheaded train engines are replaced correctly
|
|
tron
|
r2549:1549d4b2ba28
|
19 years ago
|
|
(svn r3078) Some more stuff, which piled up: - const, whitespace, indentation, bracing, GB/SB, pointless casts - use the trinary operator where appropriate - data types (uint[] -> AcceptedCargo, ...) - if cascade -> switch - if (ptr) -> if (ptr != NULL) - DeMorgan's Law - Fix some comments - 0 -> '\0', change magic numbers to symbolic constants
|
|
tron
|
r2517:f67017080a5a
|
19 years ago
|
|
|
|
tron
|
r2504:79c7d7f469fd
|
19 years ago
|
|
|
|
tron
|
r2484:d3b91bb07536
|
19 years ago
|
|
|
|
tron
|
r2477:1fce8206d479
|
19 years ago
|
|
|
|
tron
|
r2475:8ceca0de932b
|
19 years ago
|
|
(svn r3001) s/Player*/const Player*/ s/byte/PlayerID/ s/int/PlayerID/ and related changes
|
|
peter1138
|
r2464:a76823f2fdc5
|
19 years ago
|
|
|
|
Darkvater
|
r2423:976bf236862b
|
19 years ago
|
|
|
|
truelight
|
r2422:a6364887ab45
|
19 years ago
|
|
(svn r2948) -Fix: the old AI needs a special flag that triggers all kind of special abilities you really don't want to know about (free bridges, etc..) I removed this flag some revisions ago, but the Aircraft part depends on it, so I re-enabled it again..
|
|
tron
|
r2364:ae17a10ee404
|
19 years ago
|
|
|
|
ludde
|
r2316:8ac5b596cced
|
19 years ago
|
|
|
|
bjarni
|
r2293:b55e49a164c0
|
19 years ago
|
|
(svn r2817) -Codechange: [autoreplace]: moved autoreplace and autorenew to serverside -This means that one company can only have one setting for renew and replacing more clients will not fight due to different settings anymore -This is a needed step in the line to fix autoreplacing dualheaded locomotives NOTE: savegame revision bump (peter1138 + me in coop)
|
|
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
|
r2163:ae001e2aa5b0
|
19 years ago
|
|
|
|
tron
|
r2140:efb49af98a17
|
19 years ago
|
|
|
|
tron
|
r2133:180eccd2c589
|
19 years ago
|
|
|
|
tron
|
r2049:7e26d55f0f4c
|
19 years ago
|
|
|
|
tron
|
r1998:57add07880e8
|
19 years ago
|
|
|
|
tron
|
r1980:3622a0cd06c2
|
19 years ago
|
|
|
|
tron
|
r1977:1f8b99c96041
|
19 years ago
|
|
|
|
tron
|
r1926:ff7c3132a421
|
19 years ago
|
|
|
|
tron
|
r1901:e806afa50723
|
19 years ago
|
|
|
|
tron
|
r1897:d86d746aae10
|
19 years ago
|
|
|
|
Darkvater
|
r1891:c5c5466afa35
|
19 years ago
|
|
|
|
Darkvater
|
r1877:0c39eb68bf5c
|
19 years ago
|
|
|
|
orudge
|
r1874:9cf427764e8e
|
19 years ago
|
|
|
|
Darkvater
|
r1802:acc0f0bda113
|
19 years ago
|
|
|
|
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
|
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.
|
|
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.
|
|
Darkvater
|
r1614:e8a71ea30aa5
|
20 years ago
|
|
|
|
tron
|
r1533:58285dc869d3
|
20 years ago
|
|
|
|
tron
|
r1532:b2aea385d1ee
|
20 years ago
|
|
(svn r2036) Fix FindNearestHanger(), it never worked correctly because 0xFFFF != 65000 and a 16bit number has no 17th bit While here also do some const gymnastics
|
|
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
|
r1401:9e77058d4bf4
|
20 years ago
|
|
(svn r1905) - Fix: [ 1118810 ] openttd: ship_cmd.c:642 ... Assertion failed. Mapwrap fixed in ship_cmd.c (was implicitely ok before biggermaps). - CodeChange: rename all vehicle controllers to ...Controller for their similar behaviour
|
|
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
|
|
tron
|
r1299:07d5483b3f76
|
20 years ago
|
|
|
|
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)
|
|
bjarni
|
r1263:db67aaab6310
|
20 years ago
|
|
|
|
bjarni
|
r1262:001f0e9e7d82
|
20 years ago
|
|
(svn r1766) - Feature: Aircrafts will now go to the nearest hangar if the next airport in the orders do not have one (helipads)
- Fix: sometimes aircrafts would not go to the hangar even when they should. They do now
|
|
tron
|
r1245:eb9b943bd917
|
20 years ago
|
|
|
|
bjarni
|
r1238:4acabc867520
|
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
|
|
darkvater
|
r1235:e5041bfe7f02
|
20 years ago
|
|
|
|
bjarni
|
r1226:5b2629ab068b
|
20 years ago
|
|
(svn r1730) - Fix: Ships and Aircrafts have to be build in depots owned by _current_player (hacked client protection) now all 4 types of vehicles have to be build in depots. Note: there is a wordaround for AI players since the AI handle aircraft building in a weird way
|
|
tron
|
r1209:5955f8748394
|
20 years ago
|
|
|
|
bjarni
|
r1206:ae6592b77c44
|
20 years ago
|
|
|
|
bjarni
|
r1204:5d9b8dd5893b
|
20 years ago
|
|
(svn r1708) - Fix: FindNearestHangar() will no longer return a hangar where a jet will crash if it is a jet, that is searching - Codechange: Since planes move in strait lines in 8 directions, GetTileDistAdv() is used instead of manhatten distance in FindNearestHangar()
|
|
dominik
|
r1200:bd6ce8b2d603
|
20 years ago
|
|
|
|
tron
|
r1197:5c12672cee22
|
20 years ago
|
|
|
|
bjarni
|
r1196:d1b0ca2c5bef
|
20 years ago
|
|
|
|
bjarni
|
r1195:070206f4e2d9
|
20 years ago
|
|
(svn r1699) - Feature [autoreplace] a plane will now go to the hangar right after landing if it needs to be replaced
- Fix [autoreplace] fixed a typo that could prevent autoreplaced aircraft from automatically go to a hangar
|
|
bjarni
|
r1194:73e406e31125
|
20 years ago
|
|
(svn r1698) - Feature [autoreplace] helicopters will now go to the nearest hangar if they are set to autoreplace and don't have any airport with a hangar in schedule
|
|
bjarni
|
r1151:291582d8c443
|
20 years ago
|
|
(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)
|
|
dominik
|
r1150:adda5852df5d
|
20 years ago
|
|
|
|
bjarni
|
r1139:4d22fb39f318
|
20 years ago
|
|
|
|
bjarni
|
r1135:c8f4a98600b6
|
20 years ago
|
|
|
|
bjarni
|
r1128:d0dd5c69c2e5
|
20 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
|
|
tron
|
r1093:18f56ef2d029
|
20 years ago
|
|
|
|
celestar
|
r1064:4805a9877239
|
20 years ago
|
|
(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)
|
|
Celestar
|
r1055:d8dd84883c6f
|
20 years ago
|
|
|
|
celestar
|
r1053:58d626056498
|
20 years ago
|
|
(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
|
|
truelight
|
r1043:4bce03f32f7e
|
20 years ago
|
|
(svn r1544) -Fix: SwapOrder did not use AssignOrder, which caused the saveroutine to crash from time to time -Codechange: added const before 'Order *' where possible
|
|
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!
|
|
celestar
|
r1020:1bd74d43db9b
|
20 years ago
|
|
(svn r1521) -Fix: Ship Vehicle Lists are now redrawn correctly -Codechange: added some const to last commit -Codechange: Ship and Aircraft lists are now update on order change, not on new day
|
|
tron
|
r1019:90da3857ff29
|
20 years ago
|
|
|
|
celestar
|
r1018:9c1834908677
|
20 years ago
|
|
|
|
celestar
|
r950:cf7c106c0568
|
20 years ago
|
|
(svn r1440) -Feature: Allows more flexible airport layouts now, as the number of terminals in every group can be freely chosen -Codechange: AT_OILRIG is now 15, so that new airports can be added easily.
|
|
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
|
r909:898755bd4512
|
20 years ago
|
|
|
|
dominik
|
r901:2b20a278757e
|
20 years ago
|
|
|
|
dominik
|
r899:5d1940a66a22
|
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
|
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!!
|
|
truelight
|
r812:2f2818d6d63d
|
20 years ago
|
|
(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.
|
|
darkvater
|
r755:02ea8c27f87d
|
20 years ago
|
|
|
|
tron
|
r699:a8c47f6b8bd0
|
20 years ago
|
|
|
|
tron
|
r679:3a7b08cc8504
|
20 years ago
|
|
|
|
tron
|
r593:4ed1c5a33f13
|
20 years ago
|
|
(svn r1015) MFM r789 Replaced the slightly misleading SERVICE_INTERVAL by a function VehicleNeedsService()
|
|
tron
|
r588:c0748f0d2104
|
20 years ago
|
|
(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.
|
|
bjarni
|
r578:d7914d23d3b7
|
20 years ago
|
|
|
|
tron
|
r555:cefc6ad212ed
|
20 years ago
|
|
(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.
|
|
tron
|
r541:062eeec7f0a4
|
20 years ago
|
|
(svn r925) Use sound enums Also play the correct sound when a toyland road vehicle breaks down
|
|
tron
|
r538:c4b9f109ad6c
|
20 years ago
|
|
|
|
tron
|
r534:46e9db8de483
|
20 years ago
|
|
(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
|
|
tron
|
r507:b1b0a0a3c313
|
20 years ago
|
|
(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.
|
|
tron
|
r458:68fe2ec3e058
|
20 years ago
|
|
(svn r668) -Fix: [ 1068269 ] - Number of passangers and mail in exclusive test offer window is swapped - Wrong data caused by double index shift is displayed in exclusive test offer window
|