I should indeed be able to trace between both entities eyePos to detect a wallshot, but I am also looking for a way to be able to force the attack to be through a wall.
in my specific case, I am redirecting shots to the head. right now, if I shoot a visible hand, it will deal a headshot without it being considered a wallbang. I would like to be able to fix that (i.e. if a player is damaged, I need to detect if the head is visible. if not, it should deal a wallshot to the head).
I will continue to investigate