After finishing the code at the end of Chapter 7 and running it, monsters sometimes don’t get destroyed on collision. Instead, the player disappears and only the monster displays until the two are at different locations again.
If I revert the code at the end of the “Moving Entities in a Turn-Based Game” section, I don’t see this behaviour.
I ran the downloaded sample code for that chapter and found the same thing.
Thank you! That’s not one I remember running into, but I’ll take a look. I’ve added it to the issue tracker, so if there’s another edition - it will be included in the “to fix” list. When I return from vacation, I’ll see if I can find the issue - if I can, I’ll put a bug-fix up on hands-on-rust.com.
1 Like
Hi Herbert,
Thank you so much for taking the time from your vacation to respond!
I believe the problem is that on p138, build_monster_scheduler()
is missing:
.add_system(collisions::collisions_system())
.flush()
1 Like
I was just coming here to report that something was amiss in the sample code for that bit because the player kept its collision system call but the monsters lost theirs and that didn’t make sense to me.
I’m glad to see that it’s already been reported