Project-FreeGUN
Project-FreeGUN copied to clipboard
Incorrect synchronization of bullet/gun between peers in multiplayer
Game-breaking Bug 👎 :
In multiplayer whenever a peer's (say, Player1's) ammo is depleted and he/she switches to gun0 (initial gun w/ infinite ammo) via the gun1 button ("1"), the other peer (say, Player2) does not register the weapon switch and no bullets of Player1 are instanced in Player2's game, effectively making Player2 invincible. The same occurs vice-versa - (Player1) becomes invincible, but the difference is that on Player1's game client the bullets of Player1's gun are not instanced/visible when Player1 shoots but, on Player2's client the bullet's can be seen emerging from Player1's gun and Player2 can be damaged and can die from them.
How to recreate the bug:-
- Start 2 instances of the same game on the same LAN.
- Start a normal "multiplayer" match.
- Any one player (say, Player1) should pick a limited-ammo gun pickup (say, gun1 w/ ammo = 5).
- Player1 should deplete all his ammo of gun1 to zero
- THEN Player1 should switch to the initial gun (gun0 having infinite ammo) and SHOOT THE GUN normally
- Notice Player1 on Player2's client, Player1 is not shooting ANYTHING
Therefore there's an error in multiplayer sync which causes gun of enemy peer to not shoot OR his bullets not to be instanced (idk which) AFTER he switches from a depleted gun to the infinite gun.
Dev plz fix @devmcclu
Thanks for pointing this out. Didn't see this during my testing. Don't know if I currently have the time to fix it, as I have not been able to touch this project for a couple of months. Will try to get to it as soon as possible if I find myself with the free time. If someone ends up making a pull request fixing this, I will merge it right away