Commit Graph

1793 Commits (f3b217db9dd377d2e8e5d28434cc01ffe5c23b3b)
 

Author SHA1 Message Date
darkvater f3b217db9d (svn r2296) - Fix (regression): oops, forgot the MS code-decleration rules :p 19 years ago
Darkvater a72c06d845 (svn r2295) - Fix: you were still able to delete any tile if you were not careful with CmdDestroyCompanyHQ. Fixed this; thanks HackyKid. 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 aa4f2d2db2 (svn r2293) - Fix (regression): You couldn't modify commands anymore; fixed. (|| and && are kinda confusing with !=) :P 19 years ago
Darkvater 268968a8b4 (svn r2292) - Fix (regression): make error message more general for console errors. Dedicated servers are properly filtered out when requesting player-password. 19 years ago
Darkvater 6cdb9580e2 (svn r2291) - Fix (regression): When a client joined it changed the server-player's name. Funny effect; but not desired. Thanks for pointing it out Tron. It needed a bit of hacking, but is not less of a hack than the one used before :) 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 fe223eccf4 (svn r2289) - Fix (regression): check p1 param of road-depot building instead of unused p2 (typo). Thanks peter1138. 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 4ad80ae872 (svn r2287) - Fix (regression): cast stationcount to unsigned instead of p1 to signed when checking valid waypoint types. Thanks for pointing it out Tron 19 years ago
Darkvater edd8c87502 (svn r2286) - CodeChange: paramcheck the next batch of commands.
- Fix (regression): fix up terraform land where every player can terraform land (towns, map generation), and player can terraform different corners; used for building tunnels
19 years ago
Darkvater 2b96754673 (svn r2285) - Codechange: Fix up some of the missing things from server-checking; namely bridge-type, bridge-length, dragged end-tile (bridge/station), station_spread
- Fix: [ 1197256 ] max station spread patch < 7 does not work. Station spread was not taking into account when not using drag&drop. Fix this up, and add a callback to the settings window to immediately reflect the changes.
19 years ago
Darkvater 5f6de3e47c (svn r2284) - Fix (regression): [ 1197177 ] Scenario editor: desert add/remove tool removes industries. Fixed a bit too agressive desert generator. It still does remove the industry (sand's a bitch on machinery), but at least it does it cleanly :) 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
miham 8d392cf5c7 (svn r2282) [Translations] Updated to 2005-05-08 (58 strs / 3 langs) 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 f2bc27718a (svn r2280) - Fix: Check if the passed tile to DoCommand is within the current mapsize 19 years ago
Darkvater 3ad11e0ad4 (svn r2279) - Fix: Check the parameters of the first 10 Commands. While there also add proper comments for the functions and fix up CmdFailed() 19 years ago
tron b90e9d49ca (svn r2278) When renaming a station, check if the station exists and belongs to the correct player 19 years ago
Darkvater 0618a6d0df (svn r2277) - Codechange: change sscanf() into stroul() Which Does The Right Thing tm. Thanks tron 19 years ago
Darkvater 81474c2623 (svn r2276) - CodeChange: remove DebugProc() and make the ALT+0...4 codes only available in debug mode 19 years ago
Darkvater 18bc5ae77e (svn r2275) - Fix: [ 1196662 ] scrollto doesn't accept hexadecimal numbers 19 years ago
Darkvater adf929fef5 (svn r2274) - Codechange: some comments, parentheses and EngineID typedef for engine_type 19 years ago
celestar 61ca460457 (svn r2273) -Fix: Road vehicles no longer try to obtain a slot when they have crashed. (peter1138) 19 years ago
tron 69a09c6f77 (svn r2272) Remove unused attribute from struct Station 19 years ago
tron d17476b058 (svn r2271) CMD_SET_PLAYER_FACE, CMD_SET_PLAYER_COLOR, CMD_INCREASE_LOAN, CMD_DECREASE_LOAN only make sense for the current player, so don't explicitly pass a player number 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
Darkvater 42eb63a7de (svn r2269) - CodeChange: no else after return; exchange some magic 0xffff with INVALID_VEHICLE, vehicle index is of type VehicleID 19 years ago
Darkvater df21566f9f (svn r2268) - Fix [ 1195595 ] high resolutions don't work. Clamp all possible inputs of resolutions to the maximum availble 19 years ago
matthijs c85f049f52 (svn r2267) - Codechange: Reverted the typedeffing of VehicleType (r2256), since that interfered with the saveload code. 19 years ago
Darkvater b12c6bac57 (svn r2266) - Feature: it is now possible to start a dedicated server on Win98/95, for the few sadistic geeks that really want to do this (thanks for testing Hackykid). Also fix up another glitch in console output 19 years ago
Darkvater effca9f6ec (svn r2265) - Fix: some more useful help messages and consistent errors for failed console-cmds. Make command 'clients' only available in network mode 19 years ago
matthijs 95c040b723 (svn r2264) - Fix: [ 1060686 1187655 ] Changing the full-load flag on the current order doesn't take effect immediately. (glx) 19 years ago
Darkvater b2efecd9b4 (svn r2263) - Fix: If the seperator string is empty for custom currencies, everything after that is cut off. Fix it by replacing nothing with ' '. Thanks for noticing peter1138 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
Darkvater 9b8aa4c101 (svn r2260) - Fix (regression): custom currency input works again ingame 19 years ago
Darkvater ad6b37a423 (svn r2259) - Fix (regression): remove a warning and make the help for variables behave the same as for commands 19 years ago
Darkvater a1e27b1606 (svn r2258) - Fix (regression): game crashes on resizing window. Windows is a bit too aggressive with its _assume(0), and it did not even belong there 19 years ago
matthijs b22ebeda61 (svn r2257) - Fix: [NPF] NPF debug markings modify _map2 instead of _map3_hi for street tiles, corrupting them.
Some info got moved around in r1768 for street tiles, but NPF did not get updated.
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 2ab5eee78b (svn r2255) - Fix: [ 9680363 ] [NPF] Broken buoy handling for ships
Buoys will now try to get within 3 tiles of a buoy instead of a the actual buoy tile. This gets ships to got past buoys in a realistic (IMO) way instead of barging right through them.
- Fix: [NPF] Trains get curves penalties sometimes even when the track is straight.
- Add: [NPF] Ships get a penalty for going over buoys now, so they will try to go around.
- Add: [NPF] Ships get a penalty for curves too, yay for straight lines.
- Add: TrackdirToTrack(), TrackToTrackdir(), IsDiagonalTrack() and IsDiagonalTrackdir() helper functions.
- Add: IsBuoy() and IsBuoyTile() helper functions.
- Codechange: Rearranged part of the control flow of ShipController(), removing a goto.
19 years ago
Darkvater d26052c7df (svn r2254) - Fix: using 'ls' or 'dir' in the console always shows loadable savegames and does not depend on the whim of the currently open saveload dialog 19 years ago
matthijs 3b3a2b890f (svn r2253) - Fix: [ 1190896 1184378 ] [NPF] Trains ignoring their railtype (mono, maglev) (glx) 19 years ago
Darkvater 5a35c8cc4e (svn r2252) - ReFix: Redo r2251. Just remove the 'default widget handler', WDF_STD_BTN, instead of doing the "workaround" of the previous commit 19 years ago
Darkvater ece616ff22 (svn r2251) - Fix: [ 1193945 ] Clicking on the chat text box causes an assertion failure 19 years ago
Darkvater 4e1fbe54b2 (svn r2250) - Fix (regression): arguments with spaces in them were incorrectly parsed 19 years ago
matthijs 5a69201451 (svn r2249) - Fix: [ 1187703 ] [NPF] Road vehicles cannot find a depot when in a roadstop 19 years ago
Darkvater 63784c5b5a (svn r2248) - Fix (regression): fix crashing of game when joining a dedicated server (only reset _thd.pos, not the whole structure; as done in revision 2241 to fix another crash) 19 years ago
Darkvater 8f6b3154e5 (svn r2247) - Fix (regression): executing scripts now works (remove newline character(s)).
- Fix: getting help for an alias works
- Fix: '|' is an unprintable character, replace it with '\'
19 years ago