[Fixed] Old bugs not yet fixed
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
-
- Site Admin
- Posts: 7731
- Joined: Wed Jul 09, 2003 10:30 pm
Okay, fixed them both. For 1, I put back the BSP-based sight traversal that came with the Doom source. It can be slower than the blockmap-based version that Heretic and Hexen used, but it's more accurate. For 2, I changed the check so that it won't load STCFN121 unless STCFN120 and STCFN122 are also present.
-
- Posts: 69
- Joined: Mon Oct 27, 2003 1:31 pm
- Location: The Death Orb of Planet Peehole
-
- Lead GZDoom+Raze Developer
- Posts: 48598
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Regarding the sight check, after being told that in E1M3 of Doom this error occurs I did some checks and what I found was quite surprising:
It's neither a blockmap bug nor is the blockmap sight check algorithm inaccurate. I think this qualifies as a genuine bug. P_PathTraverse has the same problem which I was able to confirm with a few tests.
The problem is that the function occasionally runs into the 'else' branch with the Printf I have added for testing. This happens when the trace wants to change both the x- and y- blockmap coordinate at the same time. Normally *both* adjoining blocks should be checked in this instance. This code just screws up, however. What I find most disturbing in this instance is id's 'fix' to limit the iterations of this loop. Somehow I get the feeling that somebody was fundamentally unaware what he was doing (not that it surprises me with Doom's source.
)
Theoretically this bug should make it possible in rare situations to shoot through walls although I never managed to do it.
It's neither a blockmap bug nor is the blockmap sight check algorithm inaccurate. I think this qualifies as a genuine bug. P_PathTraverse has the same problem which I was able to confirm with a few tests.
Code: Select all
for (count = 0 ; count < 64 ; count++)
{
if (!P_SightBlockLinesIterator (mapx, mapy))
{
return false; // early out
}
if ((mapxstep | mapystep) == 0)
break;
if ( (yintercept >> FRACBITS) == mapy)
{
yintercept += ystep;
mapx += mapxstep;
if (mapx == xt2) mapxstep = 0;
}
else if ( (xintercept >> FRACBITS) == mapx)
{
xintercept += xstep;
mapy += mapystep;
if (mapy == yt2) mapystep = 0;
}
// added this for checking
else
{
Printf("P_CheckSight failed\n");
break;
}
}

Theoretically this bug should make it possible in rare situations to shoot through walls although I never managed to do it.
-
- Site Admin
- Posts: 7731
- Joined: Wed Jul 09, 2003 10:30 pm
-
- Posts: 10002
- Joined: Fri Jul 18, 2003 6:18 pm
- Location: Idaho Falls, ID
-
- Lead GZDoom+Raze Developer
- Posts: 48598
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany