The Random.Range(0,6) would occasionally return the number 5 which is one too many for the array of explosion sound effects which would lead to the Index Out Of Bounds error seen in #22 and the "zombie explosions" that wouldn't clear.
I also updated the explosion foreach loop to remove dead explosions in a second pass to avoid errors about modifying the list during its enumeration.
…ide of initial foreach loop.
The
Random.Range(0,6)
would occasionally return the number5
which is one too many for the array of explosion sound effects which would lead to the Index Out Of Bounds error seen in #22 and the "zombie explosions" that wouldn't clear.I also updated the explosion foreach loop to remove dead explosions in a second pass to avoid errors about modifying the list during its enumeration.