I suggested this long ago back in like 1997 or so on the usenet forums for XCOM (anyone remember those?).
Allow you to set ammunition to detonate after a certain distance -- e.g. if you're 25 squares away from a sectoid; set the ammo to detonate at 25 squares from the muzzle; so that even if you miss; the proximity detonation will kill him if you're close enough with your miss.
It was based off the XM-29 OICW weapon that was at the time the hottest thing in US Army technology some 15+ years ago; and the tech eventually showed up in Afghanistan as the XM-25 Punisher.
The XM25 CDTE fires 25 mm grenades that are set to explode in mid-air at or near the target. A laser rangefinder in the weapon is used to determine the distance to the target. The user can manually adjust the detonating distance by up to 10 feet (3.0 m) shorter or longer; the XM25 automatically transmits the detonating distance to the grenade in the firing chamber. The grenade tracks the distance it has traveled by the number of spiral rotations after it is fired,[5] then detonates at the proper distance to produce an air burst effect. These features make the XM25 more effective than traditional grenade launchers at the task of hitting targets that are behind cover or dug into the ground (i.e. in defilade.)