SelinaDev / Godot-Roguelike-Tutorial

Yet Another Roguelike Tutorial in Godot
MIT License
102 stars 11 forks source link

Fix typo in _cast_light #24

Closed theDrake closed 6 months ago

theDrake commented 6 months ago

I noticed that light-casting can get buggy near a dungeon's leftmost boundary, then discovered that the first say < 0 in the line if ((say < 0 and absi(sax) > x) or (say < 0 and absi(say) > y)) of _cast_light() in field_of_view.gd should actually be sax < 0 (the corresponding C++ code is if ((sax < 0 && (uint)std::abs(sax) > x) in the C++ shadowcasting implementation referenced by your tutorial). This pull request fixes each instance of that typo. Thanks for creating your tutorial, by the way! 🙂

SelinaDev commented 6 months ago

Hi, thank you for the PR. Someone already noticed it and I hadn't gotten around to it. Thank you for updating the code!