tunnelbridge_cmd.c
changeset 534 306bc86eb23e
parent 511 7c89b8581876
child 541 625227bb2a3d
equal deleted inserted replaced
533:404f9e37bff1 534:306bc86eb23e
   624 	t = ClosestTownFromTile(tile, (uint)-1); //needed for town rating penalty
   624 	t = ClosestTownFromTile(tile, (uint)-1); //needed for town rating penalty
   625 	// check if you're allowed to remove the tunnel owned by a town
   625 	// check if you're allowed to remove the tunnel owned by a town
   626 	// removal allowal depends on difficulty settings
   626 	// removal allowal depends on difficulty settings
   627 	if(_map_owner[tile] == OWNER_TOWN && _game_mode != GM_EDITOR ) {
   627 	if(_map_owner[tile] == OWNER_TOWN && _game_mode != GM_EDITOR ) {
   628 		if (!CheckforTownRating(tile, flags, t, TUNNELBRIDGE_REMOVE)) {
   628 		if (!CheckforTownRating(tile, flags, t, TUNNELBRIDGE_REMOVE)) {
   629 			SET_DPARAM16(0, t->index);
   629 			SetDParam(0, t->index);
   630 			return_cmd_error(STR_2009_LOCAL_AUTHORITY_REFUSES);
   630 			return_cmd_error(STR_2009_LOCAL_AUTHORITY_REFUSES);
   631 		}
   631 		}
   632 	}
   632 	}
   633 
   633 
   634 	if (flags & DC_EXEC) {
   634 	if (flags & DC_EXEC) {