Bug in blockmap line traverser

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!

Re: Bug in blockmap line traverser

Postby ketmar » Mon Dec 30, 2019 5:02 am

it can still miss the destination tile for long traces by one (that's why i am setting stepX/stepY to zero, and that's prolly why the same thing was done in the original code), but it shouldn't be the big problem anyway, because long traces should hit something long before the error accumulated. and if they didn't, chances are nobody will notice the miss anyway, for it being too far. ;-)

still, i am not sure why exactly it goes off-rails: it *may* be due to FP roundoff (see "#if 0" part, which fixes it in some cases). anyway, it fixed LOS in MAP31, but still didn't fixed my lightmap issues. yet i tried to check 9x9 blockmap tiles in lightmap tracer, and the artifacts are still there (yet smaller), so it seems that there is some more bugs in play.

yet i didn't noticed LOS anomalies yet, so it is at least not worser than the original code, and i think that it is way more readable (this is fairly standard code for "voxel raycasting", used almost everywhere, with added "pass through the corner" check).

p.s.: i am also clipping the line to blockmap area (that's why the code says that negative coords should not occur). dunno if current GZDoom code does this. original ZDoom code used in Vavoom seems to simply reject the whole trace if one of the endpoints is out of blockmap bounds, which is totally wrong (because the same code is used to find out which linedef was hit with hitscan attack).
User avatar
ketmar
k8vavoom developer
 
Joined: 01 Oct 2016

Re: Bug in blockmap line traverser

Postby ketmar » Wed Jan 01, 2020 6:20 am

ah, and by the way. i believe that such small snippet is not copyrightable at all, but just to play safe -- it is all mine original code, and i am putting it to Public Domain/WTFPL (whatever suits best). credits not required too.
User avatar
ketmar
k8vavoom developer
 
Joined: 01 Oct 2016

Re: Bug in blockmap line traverser

Postby Graf Zahl » Wed Jan 01, 2020 6:49 am

In this case GPL would have been fine, the code it needs to interface with is original id/Raven code which is GPLv2+.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Bug in blockmap line traverser

Postby ketmar » Wed Jan 01, 2020 7:00 am

i mean that i don't really care. the code is so trivial that i see no reasons to attach any license to it -- it is just a DDA people doing for decades. what i meant is that anybody is free to take it and use it however they like, there are totally no strings attached from my side. that is, slap any license on top of it -- i have zero objections.
User avatar
ketmar
k8vavoom developer
 
Joined: 01 Oct 2016

Previous

Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest