summaryrefslogtreecommitdiff
path: root/console_cmds.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-13 19:07:54 +0000
committertruelight <truelight@openttd.org>2004-12-13 19:07:54 +0000
commitc185adf780687428097ea5f9f82d00a64623f1b0 (patch)
tree734e060e721d3239fe20d6c5962d4c83c5ca079c /console_cmds.c
parent5b2cd5fae000d231479d79c4c9ac060d4d10b691 (diff)
downloadopenttd-c185adf780687428097ea5f9f82d00a64623f1b0.tar.xz
(svn r1067) -Add: [Console] Added comment for scripts (everything behind the # is
ignored) (GeniusDex / sign_de)
Diffstat (limited to 'console_cmds.c')
-rw-r--r--console_cmds.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/console_cmds.c b/console_cmds.c
index a62196242..395afc330 100644
--- a/console_cmds.c
+++ b/console_cmds.c
@@ -286,8 +286,9 @@ DEF_CONSOLE_CMD(ConExec)
fgets(cmd, sizeof(cmd), _script_file);
while (!feof(_script_file) && _script_running) {
- strtok(cmd, "\r\n");
- IConsoleCmdExec(cmd);
+ strtok(cmd, "\r\n#");
+ if (strlen(cmd) > 0 && cmd[0] != '#')
+ IConsoleCmdExec(cmd);
fgets(cmd, sizeof(cmd), _script_file);
}