Open GavJenks opened 6 years ago
Visual inspection of the code doesn't reveal a cause, so I'll have to test this out. I rarely use anything other than -1 (for instance, civclassic's current "1000" setting is redundant and more expensive to run, he should just use -1) so for sure this code hasn't received much attention.
Presumably there's some sort of indexing error, using a 1 instead of a 0 or something. Or perhaps the usage of ++i instead of i++ is to blame? Not sure.
But yeah, for example, if you set blocksToErode to 10, and you put 5 bastions all overlapping each other, then it will take 2x the normal number of block placements to break them all. 1 bastion takes a normal intended amount of time to break, 2 bastions take 2x as long to break, 3 or more also take 2x as long to break.
So it's doing one iteration on the random loop "for free" for some reason.
Might or might not be the same never-actually-fixed-only-avoided issue as issue #16 in the civcraft repository here: https://github.com/Civcraft/Bastion/issues/16