wallY in line 261 is sometimes < 0
hi,
the wallY is sometimes becoming negative, and so i get an error in line 261 ...
added this check before the line if (wallX >= 0 && wallX < ig.game.collisionMap.width && wallY >= 0 && wallY < ig.game.collisionMap.height) { .... }
bye
thanks for this bug report :)
do you have an idea under which circumstances this bug occurs?
I already set the maximal "bounding-box" in lines 162/163 and 168/169. maybe if the light ray heading is against the first tile in the collision map?
I'd like to avoid more checks in this inner loop.
I'm going to look at it tomorrow :)
i made you an example where you can reproduce the error and mailed it to you.
did you get it?