Zillion: cache key includes gun requirement (#1846)

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.
This commit is contained in:
Doug Hoskisson
2023-05-30 20:56:23 -07:00
committed by GitHub
parent df7462efcc
commit 1809823308

View File

@@ -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 \ if isinstance(z_loc.item, ZillionItem) and z_loc.item.player == p \
else zz_empty else zz_empty
zz_r.locations[zz_name].item = zz_item 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 return _hash