summaryrefslogtreecommitdiff
path: root/aircraft_cmd.c
AgeCommit message (Collapse)Author
2005-07-13(svn r2558) Change the internal map format from 7 arrays to one array of ↵tron
structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
2005-07-01(svn r2504) Move Draw*EngineInfo to engine_gui.c to reduce dependenciestron
2005-06-25(svn r2486) Turn TILE_FROM_XY into an inline function and rename it to ↵tron
TileVirtXY
2005-06-24(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"tron
2005-06-07(svn r2432) Use GetEngine() instead of DEREF_ENGINE() or even _engines[]tron
2005-06-04(svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix ↵tron
some bogus reads of _map_owner
2005-06-03(svn r2403) if cascade -> switchtron
2005-06-02(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.Darkvater
2005-05-30(svn r2383) - Fix: Monkey-testing turned up some command crashes.Darkvater
2005-05-30(svn r2380) - Fix: Build year for mail compartment of planes was not set ↵orudge
correctly, affected station ratings (Asterix_)
2005-05-14(svn r2306) - CodeChange: Check the last commands; refits. This needed an ↵Darkvater
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"
2005-05-12(svn r2297) - CodeChange: server-check the next batch of commands.Darkvater
- 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.
2005-05-11(svn r2294) - CodeChange: check the service interval settings when changing ↵Darkvater
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.
2005-05-11(svn r2290) - CodeChange: protect the next batch of commands. This brings us ↵Darkvater
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.
2005-05-02(svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)matthijs
- 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.
2005-04-02(svn r2118) - Fix: Fix compilation with network disabled, and comment out ↵Darkvater
some of the warnings (unused function)
2005-03-23(svn r2037) uint -> TileIndex, remove pointless casts, const, misc.tron
2005-03-23(svn r2036) Fix FindNearestHanger(), it never worked correctly because ↵tron
0xFFFF != 65000 and a 16bit number has no 17th bit While here also do some const gymnastics
2005-03-20(svn r2034) -Codechange: Replaced the rather meaningless LOAD and UNLOAD ↵celestar
flags for depots by something more meaningful
2005-03-19(svn r2024) -Fix: [autoreplace] reverted all changes involving ↵bjarni
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)
2005-02-22(svn r1905) - Fix: [ 1118810 ] openttd: ship_cmd.c:642 ... Assertion failed. ↵Darkvater
Mapwrap fixed in ship_cmd.c (was implicitely ok before biggermaps). - CodeChange: rename all vehicle controllers to ...Controller for their similar behaviour
2005-02-12(svn r1863) Give the effect vehicle type enums more descriptive names and ↵tron
use the enum as parameter type for CreateEffectVehicle*() -Fix: [1116619] Generate the correct smoke type for diesel trains
2005-02-05(svn r1803) Move debugging stuff into files of it's owntron
2005-02-04(svn r1786) -Fix: unitnumber is increased to 16bit, so now you can have up ↵truelight
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)
2005-02-02(svn r1770) -Fix: Hopefully last pieces of code that are containing a station-idtruelight
(and should be an uint16, not uint8)
2005-02-01(svn r1767) fixed mixed declarations and code in last commit (oops)bjarni
2005-02-01(svn r1766) - Feature: Aircrafts will now go to the nearest hangar if the ↵bjarni
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
2005-01-31(svn r1749) Move the functions which calculate distances to map.[ch] and ↵tron
give the more meaningful names
2005-01-30(svn r1742) - Fix: fixed bug introduced in r1730 where AI players had ↵bjarni
problems when building aircrafts
2005-01-30(svn r1741) - Fix: added IsVehicleIndex() so it's possible to protect ↵bjarni
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
2005-01-30(svn r1739) - Fix: type checking when selling vehicles (TrueLight)darkvater
2005-01-30(svn r1730) - Fix: Ships and Aircrafts have to be build in depots owned by ↵bjarni
_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
2005-01-29(svn r1713) Split off several functions which query/set information about a ↵tron
single tile from map.h and put them into a seperate file tile.h
2005-01-29(svn r1710) - Fix: [autoreplace] vehicles do no longer go to a depot all the ↵bjarni
time if the owner clicked 'stop replacing' ( ship+aircraft+road vehicles )
2005-01-28(svn r1708) - Fix: FindNearestHangar() will no longer return a hangar where ↵bjarni
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()
2005-01-28(svn r1704) - Fix: [newgrf] rotors of custom helicopters are displayed ↵dominik
correctly in the hangar window
2005-01-27(svn r1701) Style police ^^tron
2005-01-27(svn r1700) - Fix: Hacked clients can no longer be used to build vehicles ↵bjarni
that are not available yet (Hackykid)
2005-01-27(svn r1699) - Feature [autoreplace] a plane will now go to the hangar right ↵bjarni
after landing if it needs to be replaced - Fix [autoreplace] fixed a typo that could prevent autoreplaced aircraft from automatically go to a hangar
2005-01-27(svn r1698) - Feature [autoreplace] helicopters will now go to the nearest ↵bjarni
hangar if they are set to autoreplace and don't have any airport with a hangar in schedule
2005-01-24(svn r1652) Fix: train and road vehicle lists are now redrawn when vehicles ↵bjarni
enters/leaves a depot (Hackykid) fix: the ship status bar was not updated properly after a breakdown if show_speed was off (Hackykid)
2005-01-24(svn r1651) Fix: [ 1098696 ] Airport shadow remains after crashingdominik
2005-01-24(svn r1640) fix: now helicopters will use a hangar in schedule to be ↵bjarni
replaced in, even if they are only set to service there. Since helicopters are serviced at helipads, they will only go there if they needs to be replaced or renewed.
2005-01-24(svn r1636) fix: helicopters now go to a hangar if they are set for ↵bjarni
replacement or needs to be renewed
2005-01-23(svn r1629) added a counter to tell how many engines you have of each type ↵bjarni
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
2005-01-22(svn r1594) Convert all undefined parameter lists to (void) and add the ↵tron
appropriate warning flags in the Makefile
2005-01-19(svn r1565) -Fix: [ 1104969 ] Aircraft in hangar messages are now ↵celestar
revalidated before display -CodeChange: replaced one if (foo) return true else return false by return (foo)
2005-01-18(svn r1556) -Fix: Vehicle list updates should now really workCelestar
2005-01-17(svn r1554) -Fix: [ 1103187 ] Order Check messages are now validated beforecelestar
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
2005-01-16(svn r1544) -Fix: SwapOrder did not use AssignOrder, which caused the ↵truelight
saveroutine to crash from time to time -Codechange: added const before 'Order *' where possible