This paper presents an overtaking decision algorithm for networked intelligent vehicles. The algorithm is based on a cooperative tracking and sensor fusion algorithm that we previously developed. The ego vehicle is equipped with lane keeping and lane changing capabilities, as well as a forward-looking lidar sensor. The lidar data are fed to the tracking module which detects other vehicles, such as the vehicle that is to be overtaken (leading) and the oncoming traffic. Based on the estimated distances to the leading and the oncoming vehicles and their speeds, a risk is calculated and a corresponding overtaking decision is made. We compare the performance of the overtaking algorithm between the case when the ego vehicle only relies on its lidar sensor, and the case in which it fuses object estimates received from the leading car which also has a forward-looking lidar. Systematic evaluations are performed in Webots, a calibrated high-fidelity simulator.