BlockLinesIterator's ZScript support broken

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 a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: BlockLinesIterator's ZScript support broken

Re: BlockLinesIterator's ZScript support broken

by JPL » Tue Sep 26, 2017 11:15 am

_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

Re: BlockLinesIterator's ZScript support broken

by _mental_ » Tue Sep 26, 2017 1:57 am

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);
}

Re: BlockLinesIterator's ZScript support broken

by nazakomu » Mon Sep 25, 2017 6:14 pm

I would presume that someone could make a simple pull request to supersede the errors.

BlockLinesIterator's ZScript support broken

by JPL » Mon Sep 25, 2017 10:46 am

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.

Top