BlockLinesIterator's ZScript support broken

Bugs that have been investigated and resolved somehow.

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.
Post Reply
User avatar
JPL
 
 
Posts: 523
Joined: Mon Apr 09, 2012 12:27 pm
Contact:

BlockLinesIterator's ZScript support broken

Post by JPL »

Details here:
viewtopic.php?f=3&t=55073&p=1019985#p1019266

Graf confirmed there was a simple typo (constructors return a BlockThingsIterator) in zscript/base.txt, but fixing that exposed another problem whose fix is less obvious to me. Let me know if my example code from that post is doing something wrong beyond the bugged behavior.
User avatar
nazakomu
Posts: 131
Joined: Wed Nov 30, 2016 12:51 am
Graphics Processor: nVidia with Vulkan support

Re: BlockLinesIterator's ZScript support broken

Post by nazakomu »

I would presume that someone could make a simple pull request to supersede the errors.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: BlockLinesIterator's ZScript support broken

Post by _mental_ »

Fixed in dfe05f1.

Please note that the sample you provided is not quite correct. I assume you wanted something like this:

Code: Select all

PlayerPawn p = players[consoleplayer].mo;
BlockLinesIterator bli = BlockLinesIterator.Create(p, 64);
while ( bli.Next() )
{
   Console.Printf("%f", bli.CurLine.v1.p.x);
}
User avatar
JPL
 
 
Posts: 523
Joined: Mon Apr 09, 2012 12:27 pm
Contact:

Re: BlockLinesIterator's ZScript support broken

Post by JPL »

_mental_ wrote:Fixed in dfe05f1.

Please note that the sample you provided is not quite correct. I assume you wanted something like this:
Thank you! Quite right, the Printf was busted, execution just never reached it :o
Post Reply

Return to “Closed Bugs [GZDoom]”