summaryrefslogtreecommitdiff
path: root/command.c
AgeCommit message (Collapse)Author
2005-05-14(svn r2308) - Fix: enforce server-only and/or offline commands by giving ↵Darkvater
them flags in the process table. This also fixes bug "[ 1190944 ] Many commands not checked for security" - CodeChange: move ValParamRailtype() to check rail type from command.h to vehicle.h where it is better suited.
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 r2300) - CodeChange: check the last number of commands, now only the ↵Darkvater
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()
2005-05-12(svn r2298) - CodeChange: removed CmdAbuses: CmdSetTownNameType(), ↵Darkvater
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.
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-09(svn r2288) - CodeChange: protected the next batch of commands (41 so far, ↵Darkvater
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)
2005-05-09(svn r2286) - CodeChange: paramcheck the next batch of commands.Darkvater
- 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
2005-05-07(svn r2280) - Fix: Check if the passed tile to DoCommand is within the ↵Darkvater
current mapsize
2005-04-25(svn r2232) Remove unused commandstron
2005-04-15(svn r2206) - Regression Fix: slight typo of res2 into res, this also fixes ↵Darkvater
recent bug "[ 1183396 ] Train can't find depot, it gives money in Multiplayer"
2005-04-15(svn r2205) - Fixup of revision 2200, not twice CMD_REMOVE_LONG_ROAD :p. ↵Darkvater
Thanks TrueLight.
2005-04-14(svn r2200) - Fix [ 1179892 ] click & drag removal of road assertion fail. ↵Darkvater
Add CMD_REMOVE_LONG_ROAD to the 'notest' section as it might have difficulties with town ratings, etc. Read the comment for more info (mgasterix)
2005-04-14(svn r2195) Add CmdFailed() as the One True Way(tm) to check if a command ↵tron
failed.
2005-04-02(svn r2127) Get rid again of the CmdSetNewMapSize(), which was agreed to be ↵pasky
just useless clutter. (Perhaps we should get rid of CmdSetNewLandscapeType() too, but I won't take responsibility for that. ;-)
2005-04-02(svn r2125) - Feature: In the intro dialog, show a map size selector below ↵pasky
the landscape type selector.
2005-02-04(svn r1791) Remove the remnants of CMD_DESTROY_INDUSTRY, which was removed a ↵tron
long time ago
2005-01-30(svn r1731) - Fix: [ 1106930 ] BugFix: placing signals with 2x1 drags ↵darkvater
workaround is completely rewritten. Also features checks for hacked/modified clients. Thanks a lot Hackykid!
2005-01-29(svn r1721) -Feature: It is now possible to build multiple road stations (up ↵celestar
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.
2005-01-22(svn r1594) Convert all undefined parameter lists to (void) and add the ↵tron
appropriate warning flags in the Makefile
2005-01-09(svn r1451) Fix some of the signed/unsigned comparison warningstron
2005-01-07(svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn ↵tron
the latter into inline functions names Tile[XY]
2005-01-05(svn r1389) -Add: [Network] Added packet protection. No longer a client or ↵truelight
server reads beyond the size of the packet -Fix: [Network] A server no longer crashes when a client sends an invalid DoCommand, but drops the client instead.
2005-01-04(svn r1375) -Fix: [1050990] Buying trains sometimes accounted for ↵darkvater
incorrectly. Was the result of the cost getting reset in a recursive call of docommand. That is fixed. In addition all cost-commands are typed explicitely. Please do not forget to do so or your costs will be credited to construction if you are unlucky.
2005-01-02(svn r1323) Adding autoreplace featurebjarni
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()
2004-12-29(svn r1297) Language fixes in the source.. (ln-)miham
2004-12-27(svn r1283) -Add: AutoRenew is now a client-side patch instead of a ↵truelight
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.
2004-12-15(svn r1117) Move map arrays and some related macros into their own files ↵tron
map.c and map.h
2004-12-14(svn r1085) -Fix: [Network] [ 1084834 ] If IF_IN_NETWORK flag was on, an error truelight
resulted in infinite money (or assert)
2004-12-12(svn r1025) -Fix: [Network] [ 1083687 ] Sending to depot caused desync ↵truelight
because the new pathfinder uses a random, and the goto_depot uses the new pathfinder (if enabled)
2004-12-04(svn r942) -Merged branch/network back into the trunktruelight
2004-12-02(svn r901) Small step in the process to clean up the DPARAM mess:tron
- 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
2004-11-25(svn r815) Include strings.h only in the files which need it.tron
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.
2004-11-20(svn r697) Fix the town road removal crash _still_ present there.pasky
2004-11-14(svn r587) -newgrf: Rename all /Checkpoint/i tokens to 'Waypoint's. The name ↵darkvater
actually makes some sense and is also compatible with TTDPatch (pasky).
2004-09-12(svn r216) -Fix: paused network game now disallows all commands (instead of ↵truelight
doing the commands all at once when the game unpauses)
2004-09-12(svn r214) -Feature: CMD_NET_INSTANT [just in time command handling over ↵darkvater
network] (sign_de) -Fix: Only server can pause in network, action disabled for clients -Fix: Direct Connect editbox can handle up to max ~35 characters
2004-09-10(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!truelight
2004-09-01(svn r148) -Feature: Company HQ can now be moved somewhere else (cost 1% of ↵darkvater
company value). Water floods HQ. -Some layout fixes for command.c -Tileinfo debug window in console now shows Tile in decimal numbers
2004-08-15(svn r59) -Feature: Added Autosignals, just like Autorail. Can copy signal ↵darkvater
style, convert signal<->semaphore, etc. Big thanks to betatesters Dribbel and Testman57 (Darkvater)
2004-08-09(svn r1) Import of revision 975 of old (crashed) SVNtruelight