summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2005-02-22 22:29:19 +0000
committerDarkvater <darkvater@openttd.org>2005-02-22 22:29:19 +0000
commitd51e9e3d03d285a7806ba172f1282ffc5dd48ddd (patch)
tree286e52bc43183f4845f1df40adce4adc7ff234ef
parent0abd611c0a37f8d424c51c8ce2b07cf3fc6f50af (diff)
downloadopenttd-d51e9e3d03d285a7806ba172f1282ffc5dd48ddd.tar.xz
(svn r1908) - Fix: [ 1149403 ] Signals dissaper after typing text and pressing enter!. Signs in Scenario Editor have no owner so ignore that.
-rw-r--r--signs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/signs.c b/signs.c
index 355351621..c686dc1eb 100644
--- a/signs.c
+++ b/signs.c
@@ -122,7 +122,8 @@ int32 CmdPlaceSign(int x, int y, uint32 flags, uint32 p1, uint32 p2)
* Rename a sign
*
* @param sign_id Index of the sign
- * @param new owner, if OWNER_NONE, sign will be removed
+ * @param new owner, if OWNER_NONE, sign will be removed, except in scenario editor, where signs have no owner
+ * and ownership has no influence of any kind
*/
int32 CmdRenameSign(int x, int y, uint32 flags, uint32 sign_id, uint32 owner)
{
@@ -130,7 +131,7 @@ int32 CmdRenameSign(int x, int y, uint32 flags, uint32 sign_id, uint32 owner)
SignStruct *ss;
/* If GetDParam(0) == nothing, we delete the sign */
- if (GetDParam(0) != 0 && owner != OWNER_NONE) {
+ if (GetDParam(0) != 0 && (_game_mode == GM_EDITOR || owner != OWNER_NONE)) {
/* Create the name */
str = AllocateName((const char*)_decode_parameters, 0);
if (str == 0)