You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the game log was printing duplicate lines whenever I used the Fireball Scroll. At first I thought it had to do with my implemention (because I've made a few tweaks along the way), but upon further investigation, I found out that blasted_tiles.len() was longer than it should be, i.e. field_of_view was returning too many results. More precisely, there were many duplicate indices (the vector is usually 88 long). This happens when I compile your original code too, in both rltk_rs 0.5.2 and 0.5.3.
As I'm new to Rust, I haven't yet been able to trace the error. Maybe you can take a look at it? I'm currently using the latest version of Rust (1.39) with all crates updated.
Thanks!
The text was updated successfully, but these errors were encountered:
I've pushed a quick fix to RLTK to resolve this. RLTK version 0.5.7 should fix the problem. You can run cargo update -p rltk to force the git version to update.
I updated to 0.5.7 but the problem still persisted, so I made some changes and I think it is working as intended now. I've made a pull request. See: amethyst/bracket-lib#26
https://github.com/thebracket/rustrogueliketutorial/blob/23368c2b6dcc73353eb0cdbf512fde43cdbcf49b/chapter-10-ranged/src/inventory_system.rs#L78
I noticed that the game log was printing duplicate lines whenever I used the Fireball Scroll. At first I thought it had to do with my implemention (because I've made a few tweaks along the way), but upon further investigation, I found out that
blasted_tiles.len()
was longer than it should be, i.e.field_of_view
was returning too many results. More precisely, there were many duplicate indices (the vector is usually 88 long). This happens when I compile your original code too, in both rltk_rs 0.5.2 and 0.5.3.As I'm new to Rust, I haven't yet been able to trace the error. Maybe you can take a look at it? I'm currently using the latest version of Rust (1.39) with all crates updated.
Thanks!
The text was updated successfully, but these errors were encountered: