summaryrefslogtreecommitdiff
path: root/misc_cmd.c
AgeCommit message (Collapse)Author
2006-10-14(svn r6776) -Codechange: Use IsValidPlayer() function to determine of a ↵Darkvater
PlayerID is an actual playable player (< MAX_PLAYERS) or not.
2006-10-14(svn r6771) -Codechange: Replace two macros with functions. IS_HUMAN_PLAYER andDarkvater
IS_INTERACTIVE_PLAYER
2006-09-15(svn r6455) - Feature: Add 2cc (two company colours) livery schemes. This ↵peter1138
replaces the original colour selection window and bumps the saveload version. Liveries are supported for all vehicles, not just those with 2cc support. Thanks to lakie for GUI inspiration.
2006-08-28(svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else ↵rubidium
{' -> '} else {', tabs between code and comment, etc.
2006-06-27(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectaculartron
2006-04-10(svn r4342) Change the first two parameters of commands - virtual pixel ↵tron
coordinates of the tile to operate on - to a TileIndex Remove DoCommandByTile(), because now it does the same as DoCommand()
2005-12-18(svn r3313) Remove GPMI related changes from trunktron
Revisions in detail: 2542, 3226 (partial), 3229, 3231, 3232, 3238, 3242-3245, 3251, 3253, 3260, 3263, 3265, 3266, 3269, 3277, 3278, 3279, 3283 (partial), 3304, 3305, 3306
2005-11-28(svn r3243) -Fix: IncreaseLoan and DecreaseLoan were inconsistent for AIstruelight
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-22(svn r2673) Include functions.h directly, not globally via openttd.htron
2005-07-21(svn r2669) Shuffle some more stuff around to reduce dependenciestron
2005-07-21(svn r2660) Get rid of some more shifting/anding/castingtron
2005-06-21(svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayercelestar
2005-06-02(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.Darkvater
2005-05-30(svn r2387) - CodeChange: made the saveload code more readable and also ↵Darkvater
removed the 'byte' saveload arrays which means you can save an array of more than 255 elements, or bigger structs than 255 bytes. This doesn't yet solve the problem that a chunk can be a maximum of 16384 big. - Fix: also fix an unnoticed error in SlSaveLoadConv() due to wrong types.
2005-05-30(svn r2384) - Fix: Check selling land and setting player colour. Also an ↵Darkvater
extra map-bounds check for terraforming; inspired by the monkey (and Tron :) )
2005-05-30(svn r2383) - Fix: Monkey-testing turned up some command crashes.Darkvater
2005-05-24(svn r2364) - Fix (regression): [ 1206850 ] Cannot change difficulty in main ↵Darkvater
menu, always the value it was before you changed it. A too rigid check forgot to check the parameter value -1 which set the difficulty level itself.
2005-05-17(svn r2345) - Fix: Don't allow stuff to be renamed to nothing if we don't ↵Darkvater
support it. Only valid ones are signs (delete) and waypoints (rename to default).
2005-05-15(svn r2324) Introduce _cmd_text for passing strings with a command instead ↵tron
of abusing _decode_parameters as text buffer. This should prevent several possible buffer overruns and is a bit cleaner to use. As bonus it reduces the size of most command packets by 79 bytes.
2005-05-13(svn r2303) - CodeChange (fix): when giving money to other players only ↵Darkvater
allow transferring money that is above your loan. Eg you can't give away your loan. - Langfix: 'goes down by' 'increases', vv for down in english.txt.
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 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 r2291) - Fix (regression): When a client joined it changed the ↵Darkvater
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 :)
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-06(svn r2271) CMD_SET_PLAYER_FACE, CMD_SET_PLAYER_COLOR, CMD_INCREASE_LOAN, ↵tron
CMD_DECREASE_LOAN only make sense for the current player, so don't explicitly pass a player number
2005-04-25(svn r2232) Remove unused commandstron
2005-03-12(svn r2004) - Fix: [ 1149487 ] Autosave ignoring settingsDarkvater
- Fix: [ 1153926 ] All my settings in vain... IGNORED! - Change: I hope I got it all right. Pressing 'New Game' (either choosing random or a preset scenario) and 'Create Scenario' will start a new game with the settings and difficulty in the intro menu. Using 'Load Game' and 'Play Scenario' will take the values from the savegame/scenario itself.
2005-02-06(svn r1832) Next byte -> char iteration: custom namestron
2005-02-06(svn r1821) Move generic string handling functions to string.[ch] and ↵tron
introduce stre{cpy,cat}, see string.h for their semantics
2005-01-24(svn r1648) -Fix: server can now pause and unpause a game through the ↵darkvater
console. Use 'pause' and 'unpause'
2005-01-23(svn r1616) Introduce ttd_strlcat() and use it to de-uglify some piece of ↵tron
code in misc_cmd. While here rename the len parameter of ttd_strlcpy() to size, because it is a buffer size and not a string length. Also add -Wwrite-strings to the Makefile, because the above mentioned piece of code was the only part which triggered this warning.
2005-01-12(svn r1486) -Codechange: moved all 'signs' stuff to signs.c/h and prepared ↵truelight
it for dynamic arrays
2005-01-03(svn r1330) Increase size of some vars from int16 to int32 to guard against ↵tron
future overflows
2004-12-28(svn r1286) -Fix: oeps, I clamp'd some numbers wrong :$truelight
2004-12-28(svn r1284) -Fix: Fixed 'money-cheat' (read: bug which could give people a ↵truelight
lot of money)
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-09-10(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!truelight
2004-08-20(svn r85) -Add: initial commit of new AI (enable in Patch menu)truelight
-Add: generalised A* Algorithm -Add: generalised queues (Fifo, Stack, InsSort, BinaryHeap)
2004-08-09(svn r1) Import of revision 975 of old (crashed) SVNtruelight