Esempio n. 1
0
        /*
         * ==============
         * =
         * = PTR_SightTraverse
         * =
         * ==============
         */

        public static bool PTR_SightTraverse(p_local.intercept_t in_)
        {
            if (in_ == null)
            {
                return(true);
            }

            r_local.line_t li;
            int            slope;

            li = in_.line;

            //
            // crosses a two sided line
            //
            p_maputl.P_LineOpening(li);

            if (p_maputl.openbottom >= p_maputl.opentop) // quick test for totally closed doors
            {
                return(false);                           // stop
            }
            if (li.frontsector.floorheight != li.backsector.floorheight)
            {
                slope = d_main.FixedDiv(p_maputl.openbottom - sightzstart, in_.frac);
                if (slope > bottomslope)
                {
                    bottomslope = slope;
                }
            }

            if (li.frontsector.ceilingheight != li.backsector.ceilingheight)
            {
                slope = d_main.FixedDiv(p_maputl.opentop - sightzstart, in_.frac);
                if (slope < topslope)
                {
                    topslope = slope;
                }
            }

            if (topslope <= bottomslope)
            {
                return(false);          // stop
            }
            return(true);               // keep going
        }
Esempio n. 2
0
 public virtual bool function(p_local.intercept_t in_)
 {
     return(false);
 }