It depends on the situation. If the golfer is being reasonable--e.g. aiming where he/she should--and just happens to have an unusually long shot or bad slice which takes it into traffic, the golfer is not liable, since he did nothing wrong: he playing the game in a reasonable way in the place it should be played. If the golfer for some reason decides to hit the ball into or near traffic--i.e. not where he should be--then he can be held liable for the consequences.