Make 2 masked walls with a gap between them. This is what happens when the center of a sprite is visible in this gap.
Attached File(s)
- 
				
 bug.zip (443bytes)
Number of downloads: 334 
 bug.zip (443bytes)
This post has been edited by fgsfds: 12 April 2013 - 03:15 AM
Plagman, on 18 March 2012 - 03:36 PM, said:
while (we have masked walls to draw)
{
    _point2d dot = <first point of the masked wall>;
    _point2d dot2 = <second point of the masked wall>;
    _equation maskeq = <plane between 1st and 2nd points>;
    // additional:
    _equation p1eq = <plane between cur. position and 1st point>;
    _equation p2eq = <plane between cur. position and 2nd point>;
    _point2d middle = <midpoint between 1st and 2nd points>;
    for (all sprites yet to draw)
    {
        _point2d spr = <position of sprite>;
        if (!sameside(maskeq, spr, pos) &&
                sameside(p1eq, middle, spr) &&
                sameside(p2eq, middle, spr))
        {
            <draw the sprite first>
        }
    }
    <draw the masked wall>
}
<draw the remaining sprites>
This post has been edited by Fox: 22 April 2013 - 01:21 AM
This post has been edited by Plain Simple Garek: 18 January 2014 - 05:39 AM
Helixhorned, on 18 January 2014 - 04:44 AM, said:
This post has been edited by ToiletDuck64: 20 January 2014 - 03:25 AM
Plagman, on 19 January 2014 - 01:42 PM, said:
Plain Simple Garek, on 20 January 2014 - 05:46 AM, said:
ToiletDuck64, on 20 January 2014 - 03:23 AM, said:
 MICKY_maskbug.zip (1.79K)
Plagman, on 19 January 2014 - 01:42 PM, said:

Plagman, on 21 January 2014 - 02:33 PM, said:
Quote
Quote