Moby4585 / Joy-of-Sailing

Adds sailing to Vintage Story
3 stars 2 forks source link

Multiplayer: Values specified in sailboat.json are taken from the client, not the server #1

Open Lantalia opened 1 year ago

Lantalia commented 1 year ago

Repro: Modify your sailboat.json to specify windMultiplier 2000, hullSpeed 1000 Join a multiplayer server using Joy-of-Sailing Result: You may as well be teleporting around the map

Side issue, when the server increases the values, clients that still have the default values can desync, especially when there is a passenger, and boats can 'dissapear' in crashes due to the server thinking the boat is well ahead of where the client thinks it is.

Potential Solution: Switch to using api.World.Config for values that should not be configurable on an individual player basis when playing on a server

Do you accept pull requests? If not, what license are you distributing your mod under, as, worst case, I will need to pull this mod into my own and tweak it there for use on a large community server