I hope I get an answer to this one

.
I have a water stream that travels downward over steps and I was wondering if there was anyway to detect at what camera.z's height has to be for the portal to reflect properly.
If I just have the standard code (view.z = 2*view.portal_z - camera.z) the block entities in my level down't show up when shaders are applied to them.
(Yes I excluded the NOSHADER flag).
But they do show in the reflection if I exclude the NOPORTAL or I move the level either up or down in WED.
Excludeing the NOPORTALCLIP option is no good as when I am in the third person view the reflections are horrible.
So is there anyway of doing this with maybe a c_scan or c_trace to set camera.z properly.
Any help would be greatly appreciated.