Mr. Alias Nameless, on 04 September 2015 - 12:34 AM, said:
I tried ifawayfromwall - works only on border of two sectors. On a step for example. If to stand at a wall, distance too big. Player too thick
You can use hitscan, but it's not easy. You would have to scan from the player's position at at least two different heights and many different angles. Then check the return values. If one of the scans hit a wall at nearby coordinates, then the player is "touching" the wall. If you require the player to be facing the wall, then it's only a few scans. I have some code which does this as part of the mantle check in DukePlus.