Gao Guang knew where the sniper was, of course, he only knew a rough area.
The trunk lid was open; a bullet had struck just above the tail light cover, piercing through the car's tail at an oblique angle and leaving a through-and-through bullet hole in the thin sheet metal, roughly indicating the sniper's position.
Then Gao Guang's rifle was hit by a bullet, which went straight through the gas block above the barrel.
Gao Guang could tell that the sniper was in a house directly opposite the villa, and most likely on the roof because the roof was open and allowed for the firing of rocket launchers, and the sniper probably moved with the person firing the rocket launchers.
That house wasn't very tall to begin with; if it weren't for the rooftop, there wouldn't be enough height, and thus not enough range of fire.