summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2005-05-11 00:00:27 +0000
committerDarkvater <Darkvater@openttd.org>2005-05-11 00:00:27 +0000
commitb43331c931e2e8f8586080c9d8bee022bfe3aa5b (patch)
tree52f7adfab821276fb325d32c2907e8ab6461f2a5 /command.c
parentea9a6ed27b7b3d67e6cb53b9bf7ab7f3f70e9359 (diff)
downloadopenttd-b43331c931e2e8f8586080c9d8bee022bfe3aa5b.tar.xz
(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.
Diffstat (limited to 'command.c')
-rw-r--r--command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/command.c b/command.c
index aab1bda39..fdbb00731 100644
--- a/command.c
+++ b/command.c
@@ -208,7 +208,6 @@ static CommandProc * const _command_proc_table[] = {
CmdTrainGotoDepot, /* 39 */
CmdForceTrainProceed, /* 40 */
CmdReverseTrainDirection, /* 41 */
- /***************************************************/
CmdModifyOrder, /* 42 */
CmdSkipOrder, /* 43 */
@@ -237,6 +236,7 @@ static CommandProc * const _command_proc_table[] = {
CmdSellAircraft, /* 59 */
CmdStartStopAircraft, /* 60 */
+ /***************************************************/
CmdBuildAircraft, /* 61 */
CmdSendAircraftToHangar, /* 62 */
CmdChangeAircraftServiceInt, /* 63 */
@@ -302,7 +302,7 @@ static CommandProc * const _command_proc_table[] = {
CmdStartScenario, /* 109 */
CmdBuildSignalTrack, /* 110 */
CmdRemoveSignalTrack, /* 111 */
- CmdDestroyCompanyHQ, /* 112 */
+ CmdDestroyCompanyHQ, /* 112 <-- done */
CmdGiveMoney, /* 113 */
CmdChangePatchSetting, /* 114 */
CmdReplaceVehicle, /* 115 */