The array_reset function makes sure the counts are set to 0 as well. This fixes a regular crash I was getting in my game when I ran it with local client and server instances and then connected/reconnected a bunch. The problem I actually hit was related to peer.channels not calling array_reset, but from looking at the surrounding code in the other places I changed it I think they can/should also be changed to array_reset (if you know the code well, it would be great if you checked these too)
The array_reset function makes sure the counts are set to 0 as well. This fixes a regular crash I was getting in my game when I ran it with local client and server instances and then connected/reconnected a bunch. The problem I actually hit was related to peer.channels not calling array_reset, but from looking at the surrounding code in the other places I changed it I think they can/should also be changed to array_reset (if you know the code well, it would be great if you checked these too)