Skill with the weapon itself is only part of the story. The layout of the environment significantly influences close combat. Not only does it constrain player movement, but also the weapons and the blast resulting from the explosion (a.k.a. splash damage). Both participants in the fight have to deal with the environment. It affects the attacker and the defender in different ways:
Interestingly, the roles are almost never as clear-cut. Firing often happens simultaneously, which means each player is partially an attacker and a defender. That said, there is usually a dominant party, so the descriptions apply as trends.
This can be especially challenging when the parties involved are in close proximity. Local fire is both very important and extremely dangerous. Both players therefore have to look out for backfire. It can be quite damaging—and embarrassing—to accidentally shoot into a nearby wall. Such pitfalls are quite common in close combat, and need to be prevented by the AI, too.