Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Zillion: cache key includes gun requirement (ArchipelagoMW#1846)
Browse files Browse the repository at this point in the history
The key for the logic cache was missing some important information, so it was yielding a cache hit when it should have been a miss.
beauxq authored and Jouramie committed Feb 28, 2024
1 parent 4e02d0e commit 196bcea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worlds/zillion/logic.py
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ def set_randomizer_locs(cs: CollectionState, p: int, zz_r: Randomizer) -> int:
if isinstance(z_loc.item, ZillionItem) and z_loc.item.player == p \
else zz_empty
zz_r.locations[zz_name].item = zz_item
_hash += hash(zz_name) ^ hash(zz_item)
_hash += (hash(zz_name) * (z_loc.zz_loc.req.gun + 2)) ^ hash(zz_item)
return _hash


0 comments on commit 196bcea

Please sign in to comment.