ShadowImpact icon indicating copy to clipboard operation
ShadowImpact copied to clipboard

wallY in line 261 is sometimes < 0

Open hurik opened this issue 13 years ago • 2 comments

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

hurik avatar May 13 '12 18:05 hurik

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 :)

fourty2 avatar May 13 '12 19:05 fourty2

i made you an example where you can reproduce the error and mailed it to you.

did you get it?

hurik avatar May 14 '12 02:05 hurik