I don't think that this can work, at least not with c_trace. You need to cast a ray for hitting a polygon, but at a length of 0 the ray can not hit anything.

In A6, there was a special mode to detect passable water blocks, but as to my knowledge this also required that the ray hit the surface of that block. I'm not sure though, this was quite long ago.

Since A7, we recommend using terrain for water. You can then simply check if the player is in water or not by comparing his position with the water surface. c_trace was not changed since A7.