Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: portal creation on top of existing trap didn't account for ammo
Fuzzer-discovered. For some reason, the way portals are created is that a region is defined, then the rest of the special level creation happens (including adding traps), then in fixup_special() it actually tries to create the portal. If the region is a single coordinate to make the portal appear in a certain spot, and a trap already generated there, it deletes the trap. This is all well and good except the trap may contain ammo and if it does, this caused an impossible since it wasn't previously expected. Now that I know this is a legitimate possibility, explicitly handle ammo (by deleting it).
- Loading branch information