summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-03 12:47:11 +0000
committerrubidium <rubidium@openttd.org>2010-08-03 12:47:11 +0000
commit0664955db72d2e721baa874d6eefe6dc7447e48e (patch)
treef7a30c944d83e825d548fd125d800e4a068fb48e
parent725c181445867867ead55e74b237be4831a36602 (diff)
downloadopenttd-0664955db72d2e721baa874d6eefe6dc7447e48e.tar.xz
(svn r20343) -Fix (r20342): don't start svn commit too early... it won't see the later changes
-rw-r--r--src/unmovable_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp
index ec08b4096..4e6341961 100644
--- a/src/unmovable_cmd.cpp
+++ b/src/unmovable_cmd.cpp
@@ -144,7 +144,7 @@ CommandCost CmdBuildUnmovable(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
if (type >= UNMOVABLE_MAX) return CMD_ERROR;
const UnmovableSpec *spec = UnmovableSpec::Get(type);
- if (spec->flags & OBJECT_FLAG_ONLY_IN_SCENEDIT && _game_mode != GM_EDITOR) return CMD_ERROR;
+ if (spec->flags & OBJECT_FLAG_ONLY_IN_SCENEDIT && (_game_mode != GM_EDITOR || _current_company != OWNER_NONE)) return CMD_ERROR;
if (spec->flags & OBJECT_FLAG_ONLY_IN_GAME && (_game_mode != GM_NORMAL || _current_company > MAX_COMPANIES)) return CMD_ERROR;
int size_x = GB(spec->size, 0, 4);
@@ -196,7 +196,7 @@ CommandCost CmdBuildUnmovable(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
}
if (flags & DC_EXEC) {
- BuildUnmovable(type, tile);
+ BuildUnmovable(type, tile, _current_company);
/* Make sure the HQ starts at the right size. */
if (type == UNMOVABLE_HQ) UpdateCompanyHQ(tile, hq_score);