c_trace returns 0 when nothing is hit, otherwise the return value is non-zero. Note though that hit could mean that anything was hit, not just the player, so you should check wether you is equal to the player.
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com