...
OK, this is by far the weirdest bug I’ve ever encountered since high school, where for whatever reason a “cout <<” line didn’t want to respond, so I just had to repeat the line, completely baffling my teacher and myself.
This is a similar caliber, my crit code rolls a random number between 0 and 100, if it’s below your crit chance, you successfully crit. That part works, I’ve verified that. Yet, then I pass that crit flag to Fire(), and it doesn’t touch it until it checks to see if it needs to do the crit multiplier, or destroy the crit trail. And 100% of the time, whether the crit was successful or not in the previous part, crit is set to false here. I don’t touch the variable aside for the initial assigning, passing and the 3 checks (1 for the actual, 2 for the debugging to confirm that yes, the bit is swapping!) I don’t get how this is even possible, there’s nowhere the code goes in between, and even if it did, it’d be out of scope!
And so, I am just staring at this, see the glaring (but minor) inefficiency in the code up there (I check for crit every update instead of every time it fires) and miraculously the bug is fixed.
what














