diff options
author | rubidium <rubidium@openttd.org> | 2007-12-27 13:35:39 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-12-27 13:35:39 +0000 |
commit | 384503e7d37f4b68c1480f6e6ca81adf84ef137d (patch) | |
tree | 7262db82a9e80413b5783b88be96602fdd29a485 /src/console_cmds.cpp | |
parent | 4e66f5a04b3b1393a13fa81edfdd10243aaf13a4 (diff) | |
download | openttd-384503e7d37f4b68c1480f6e6ca81adf84ef137d.tar.xz |
(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.
Diffstat (limited to 'src/console_cmds.cpp')
-rw-r--r-- | src/console_cmds.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 9eb085453..c9065f347 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -19,7 +19,6 @@ #include "settings.h" #include "fios.h" #include "fileio.h" -#include "vehicle.h" #include "station.h" #include "screenshot.h" #include "genworld.h" @@ -30,6 +29,7 @@ #include "functions.h" #include "map_func.h" #include "date_func.h" +#include "vehicle_func.h" // ** scriptfile handling ** // static FILE *_script_file; @@ -137,19 +137,12 @@ DEF_CONSOLE_CMD(ConResetTile) DEF_CONSOLE_CMD(ConStopAllVehicles) { - Vehicle* v; if (argc == 0) { IConsoleHelp("Stops all vehicles in the game. For debugging only! Use at your own risk... Usage: 'stopall'"); return true; } - FOR_ALL_VEHICLES(v) { - /* Code ripped from CmdStartStopTrain. Can't call it, because of - * ownership problems, so we'll duplicate some code, for now */ - v->vehstatus |= VS_STOPPED; - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); - InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); - } + StopAllVehicles(); return true; } #endif /* _DEBUG */ |