...
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













