summaryrefslogtreecommitdiff
path: root/src/command.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-09-22 12:59:43 +0000
committerrubidium <rubidium@openttd.org>2007-09-22 12:59:43 +0000
commited96cd271123b9c9936c08b9c721afe2b4695c56 (patch)
treeabf69599a75ef23c1a5e3ed954a9d8866fe64a27 /src/command.cpp
parenta0946e5d7e955ad9c83f9063627db8a889b38239 (diff)
downloadopenttd-ed96cd271123b9c9936c08b9c721afe2b4695c56.tar.xz
(svn r11138) -Codechange: prepare some subsystems for persistent storage for NewGRFs.
Diffstat (limited to 'src/command.cpp')
-rw-r--r--src/command.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/command.cpp b/src/command.cpp
index ca7f950cf..4370f9b19 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -15,6 +15,7 @@
#include "network/network.h"
#include "variables.h"
#include "genworld.h"
+#include "newgrf_storage.h"
const char *_cmd_text = NULL;
@@ -573,6 +574,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback,
_docommand_recursive = 0;
_cmd_text = NULL;
+ ClearStorageChanges(false);
return false;
}
@@ -603,6 +605,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback,
if (_network_dedicated || (_network_server && pbck == PLAYER_SPECTATOR)) _local_player = pbck;
_docommand_recursive = 0;
_cmd_text = NULL;
+ ClearStorageChanges(false);
return true;
}
#endif /* ENABLE_NETWORK */
@@ -643,6 +646,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback,
if (callback) callback(true, tile, p1, p2);
_cmd_text = NULL;
+ ClearStorageChanges(true);
return true;
show_error:
@@ -656,6 +660,7 @@ callb_err:
if (callback) callback(false, tile, p1, p2);
_cmd_text = NULL;
+ ClearStorageChanges(false);
return false;
}