With a pistol it's their grade. Valve's released code gives every enemy a skill with each gun, in five steps from "Poor" to "Perfect". A metrocop with a pistol is Poor, the lowest: his shots spread two and a half times as wide as a perfect shot's. A soldier with his rifle is Good. A metrocop with a submachine gun is Very Good, better than a soldier with the same gun.
On your airboat it's a rule of its own. The code doesn't aim his burst at you: it lays a line on the water toward where you're going and calls it the line of death. The first shots land short, at water level. A note in the code says why: "This will make us aim a stitch at the feet of the player so we can see it." The burst walks up the line, sweeps it if you steer off, and turns to you if you stay on it.
Then the code reads your speed. "We want a certain amount of reaction time before the shots hit the boat": the burst gets 2.5 seconds, and two tables of your speed and distance shade it and the "Max number of times we can hit the enemy". Slow and near him, the reaction time halves and the cap rises to as many as five hits. At full throttle both tables drop out: the whole 2.5 seconds, and one or two hits. After that he starts "shooting over the head of the enemy", and every bullet left in the burst is fired with you on its ignore list.
The soldiers get none of this. Their own rule is another one: drop out of their sight for under three seconds without moving far, and they "throw a grenade in to flush him out. A wee bit of cheating here..."
The canal, the boat, its speeds, the distances and the hit counts on screen are our own simplified version, run in code from Valve's lines. Not affiliated with or endorsed by Valve.
Cops or soldiers: which gave you more trouble?
Sources: Half-Life 2 (Valve, 2004), Valve's released source code (Source SDK: npc_metropolice.cpp, npc_combine.cpp, the weapon files; files headed Copyright 1996-2005), cross-read against Valve's Source SDK 2013.
Sounds and music: our own, made in code.
