Bugged Deep Pits

This is the second game now where I’ve had a pit that I was unable to fill in. I use spike pit traps in my games, where I set up a two-by-three row of spike traps and just bait zombies and such over and take advantage of a zombie’s utter lack of concern with its general environment. However, cleaning up these sites has lead me to a bug, where I attempt to fill in a pit and am unable to do so. This last game I had there were 2 pits with spikes in them that I gave the fill construction order, but instead of a shallow pit I could erase next it gave me another deep pit. When I tried to fill that one in, it said I could not build there.

I’m not positive but I think it might be something to do with having the spike pit spears breaking first; I would rebuild them, naturally, and just lob something at the zombies trying to crawl through. This last time not many broke; i think it only happened twice. Which just so happens to be the number of pits that got bugged out. I don’t know if they were the ones I repaired.

It doesn’t affect things TOO much, but inevitably there is a bugged pit you can never ever get rid of sitting there and it is a little…annoying. Just thought someone should know.

Got it to reproduce. Looks like the trap part of the pit isn’t properly removed, as evidenced by the move cost dropping to 100 (from 400 that pits have). It seems to only happen to those pits that were created from glass/spiked pit due to glass/spears breaking.

I think it’s because the system for pit traps changed and now they’re a terrain-that-is-a-trap, while the old code for spiked/glass pits treats them as separate trap entities. If I’m right, this should be trivial to fix.

Just merged the fix, let us know if it acts up again, please.