I’m pretty sure the first wall hack I heard of was on the Quake engine so that must be something they fixed later on?
Many custom servers in games like CS enable a more aggressive version, in cases where you geographically will be close, so you can rule out high latency connections and have more aggressive fog of war.
The engine has a flag that is mainly used to draw the player's weapon (which is rendered above the rest). Using this flag for players was the "engine compliant" way of making a wall hack.
Or in team fortress, replace the sniper's red aimpoint dot with a big model. They become easier to avoid.
Of course not great from large distance / players behind multiple walls but I think the server wouldn't send you the info of those guys anyway.