Items didn't spawn at for Terrace #78
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
for example: only the armour in the store room spawned, none of the weapons of shields or lockpicks
I didn't have this issue in the latest build, lets have someone else confirm then close if all is good.
This is an item logged from the To-Do and was originally reported by GiantFriendlyTalkingSpiderman. If you are familiar with or can recreate this bug, please provide details here.
I think this might be the same as #106, or at least related.
I believe I know why this happened and have the fix.
b305f03cc7/src/scenario/scenario.cpp (L546)Here, we're saving out the item_taken bitset for each town but skipping ones where no item was taken, so we're writing something like
b305f03cc7/src/scenario/scenario.cpp (L559)Here we're reading those bitsets in, but not treating it as map-encoded. So the wrong bitsets can load into the wrong towns. This also causes an item duplication bug. Using
extractSparse()and making sure the bitsets get assigned properly should fix my item dupe bug and bugs like this where items never spawn where they should.