mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-09-01 02:49:10 +00:00
(svn r1887) Stylistic change of ConExec()
This commit is contained in:
@@ -594,18 +594,15 @@ DEF_CONSOLE_CMD(ConNetworkConnect)
|
|||||||
DEF_CONSOLE_CMD(ConExec)
|
DEF_CONSOLE_CMD(ConExec)
|
||||||
{
|
{
|
||||||
char cmd[1024];
|
char cmd[1024];
|
||||||
bool doerror;
|
|
||||||
|
|
||||||
if (argc<2) return NULL;
|
if (argc < 2) return NULL;
|
||||||
|
|
||||||
doerror = true;
|
|
||||||
_script_file = fopen(argv[1], "r");
|
_script_file = fopen(argv[1], "r");
|
||||||
|
|
||||||
if (_script_file == NULL) {
|
if (_script_file == NULL) {
|
||||||
if (argc>2) if (atoi(argv[2])==0) doerror=false;
|
if (argc <= 2 || atoi(argv[2]) != 0) IConsoleError("script file not found");
|
||||||
if (doerror) IConsoleError("script file not found");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
_script_running = true;
|
_script_running = true;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user