diff options
author | frosch <frosch@openttd.org> | 2012-01-22 13:54:02 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-01-22 13:54:02 +0000 |
commit | 5bf1710a28021f7eef8dcc91cbfe08dd1ad0c215 (patch) | |
tree | cfeedeaa0ef1f8efa0fd2442fec3ac9f591db3b2 /src/signs_cmd.cpp | |
parent | b9192ac432bf915d3020c6d23e6368903b805061 (diff) | |
download | openttd-5bf1710a28021f7eef8dcc91cbfe08dd1ad0c215.tar.xz |
(svn r23835) -Change [FS#4999]: Make signs placed in scenario editor belong to the GS. That way they are always shown in game and are not editable.
Diffstat (limited to 'src/signs_cmd.cpp')
-rw-r--r-- | src/signs_cmd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/signs_cmd.cpp b/src/signs_cmd.cpp index 033ddf123..3109d1ef0 100644 --- a/src/signs_cmd.cpp +++ b/src/signs_cmd.cpp @@ -45,7 +45,7 @@ CommandCost CmdPlaceSign(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 /* When we execute, really make the sign */ if (flags & DC_EXEC) { - Sign *si = new Sign(_current_company); + Sign *si = new Sign(_game_mode == GM_EDITOR ? OWNER_DEITY : _current_company); int x = TileX(tile) * TILE_SIZE; int y = TileY(tile) * TILE_SIZE; @@ -78,7 +78,7 @@ CommandCost CmdRenameSign(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 { Sign *si = Sign::GetIfValid(p1); if (si == NULL) return CMD_ERROR; - if (si->owner == OWNER_DEITY && _current_company != OWNER_DEITY) return CMD_ERROR; + if (si->owner == OWNER_DEITY && _current_company != OWNER_DEITY && _game_mode != GM_EDITOR) return CMD_ERROR; /* Rename the signs when empty, otherwise remove it */ if (!StrEmpty(text)) { @@ -89,7 +89,7 @@ CommandCost CmdRenameSign(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 free(si->name); /* Assign the new one */ si->name = strdup(text); - si->owner = _current_company; + if (_game_mode != GM_EDITOR) si->owner = _current_company; si->UpdateVirtCoord(); InvalidateWindowData(WC_SIGN_LIST, 0, 1); |