[1.190.101][MP] Desync between server shoot and client shoot

Digi shared this bug 4 years ago

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.

Replies (2)


Hello, Engineer!

Thank you for your feedback! Your topic has been added between considered issues.

Please keep voting for the issue as it will help us to identify the most serious bugs.

We really appreciate your patience.

Kind Regards

Keen Software House: QA Department


A similar thing happens with reloading because fired shots are not synchronized.

1. Place a missile turret, a cockpit and a power source.

2. Fire 3 missiles from it (terminal or direct control, does not matter).

3. Reconnect to server.

4. Go in cockpit and control the turret, fire 3 shots and notice how it stops shooting but doesn't say it's reloading.

If you fire 3 more shots it will suddenly say it's reloading while you can still shoot.

Leave a Comment
Attach a file