summaryrefslogtreecommitdiff
path: root/src/console_cmds.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-12-27 13:35:39 +0000
committerrubidium <rubidium@openttd.org>2007-12-27 13:35:39 +0000
commit722613f7f3d833e28193f4c628161a372aa346b5 (patch)
tree7262db82a9e80413b5783b88be96602fdd29a485 /src/console_cmds.cpp
parentae3206cd97f78a4657f6a33603125bf98811b726 (diff)
downloadopenttd-722613f7f3d833e28193f4c628161a372aa346b5.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.cpp11
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 */