From 9d05289147bd09a38babdae9171d617c7a8876c1 Mon Sep 17 00:00:00 2001 From: truelight Date: Fri, 17 Dec 2004 17:06:20 +0000 Subject: [PATCH] (svn r1146) -Fix: You can no longer change waypoints whom are owned by somebody else --- main_gui.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main_gui.c b/main_gui.c index 97e516c051..1f1b01712e 100644 --- a/main_gui.c +++ b/main_gui.c @@ -376,6 +376,13 @@ void ShowRenameSignWindow(SignStruct *ss) void ShowRenameWaypointWindow(Waypoint *cp) { int id = cp - _waypoints; + + /* Are we allowed to change the name of the waypoint? */ + if (!CheckTileOwnership(cp->xy)) { + ShowErrorMessage(_error_message, STR_CANT_CHANGE_WAYPOINT_NAME, GET_TILE_X(cp->xy) * 16, GET_TILE_Y(cp->xy) * 16); + return; + } + _rename_id = id; _rename_what = 1; SetDParam(0, id);