[1.190.101][MP] Desync between server shoot and client shoot
The timing of when server shoots a weapon and when client think that weapon shot can get quite desynchronized.
So basicaly this was found because some mods rely on Gunbase.LastShootTime and that is only set on the client's Shoot() method for all weapons, which uncovered this vanilla issue that Shoot() can get called at weird times.
The reason the replication method is with a gatling is because its effects are tied to Shoot(), while missile turrets' effects are tied to the missile which is sent by server when it actually shoots.
A reliable way I found to replicate this requires a mod in order to show what the client thinks vs what the server thinks.
1. Create a DS with an empty creative world and this mod: https://steamcommunity.com/sharedfiles/filedetails/?id=1740915182
2. Join the DS.
3. Place a gatling turret with power.
4. Turn Shoot ON in its control panel.
5. Create a large wall of armor somewhere nearby and Ctrl+X it.
6. Reconnect to the server.
7. Right after the turret is visually done shooting, paste the wall in front of it.
This is what you'll likely experience:
If not, repeat from step 6 as it needs to get in a desync mood :P
In case it wasn't clear, this is an issue for any mod that wants to do things when a weapon shoots, and doesn't necessarily narrow down to this particular use case with shoot=on but can be caused by controlling a turret as well and who knows what other cases.
A resync packet for turret long continuous fire should be sent at some interval to ensure they're properly synchronized.