src/road_cmd.cpp
changeset 7247 78a25ab85148
parent 7228 fe4afd3ea365
child 7252 9a5ca22a83c8
equal deleted inserted replaced
7246:145124064e1f 7247:78a25ab85148
    49 	RoadBits n;
    49 	RoadBits n;
    50 	*edge_road = true;
    50 	*edge_road = true;
    51 
    51 
    52 	if (_game_mode == GM_EDITOR || remove == ROAD_NONE) return true;
    52 	if (_game_mode == GM_EDITOR || remove == ROAD_NONE) return true;
    53 
    53 
    54 	/* Only do the special processing for actual players. */
    54 	/* Water can always flood and towns can always remove "normal" road pieces.
    55 	if (rt == ROADTYPE_ROAD && !IsValidPlayer(_current_player)) return true;
    55 	 * Towns are not be allowed to remove non "normal" road pieces, like tram
       
    56 	 * tracks as that would result in trams that cannot turn. */
       
    57 	if (_current_player == OWNER_WATER ||
       
    58 			(rt == ROADTYPE_ROAD && !IsValidPlayer(_current_player))) return true;
    56 
    59 
    57 	/* Only do the special processing if the road is owned
    60 	/* Only do the special processing if the road is owned
    58 	 * by a town */
    61 	 * by a town */
    59 	if (owner != OWNER_TOWN) return (owner == OWNER_NONE) || CheckOwnership(owner);
    62 	if (owner != OWNER_TOWN) return (owner == OWNER_NONE) || CheckOwnership(owner);
    60 
    63