DarkMultiPlayer Client

DarkMultiPlayer Client

38.8k Downloads

Game time shifts with OS time

oldmud0 opened this issue ยท 1 comments

commented

Nightmare posted on the forums:

One thing i noticed and a question:

I played more or less dmp since the 0.162 release on a server of my own (single to try out things) and i noticed something that is a little bit disturbing.
Every time I close the server and reopen I loose ingame time more or less (server shifts in inagametime forward when i put it offline and on again)

Is their a function which takes the internal clock of the pc and shifts time forward accordingly?

Like today i closed the server for six hours wrote down the timestamp, now reopend it joined it and it shifts arround 6 hours forward.
Is this intended how can i switch that off?

Cause Problem I have,
if i have a manovernode lets say in two kerbal days 12 hours and i switch server off and put it on 24 hours later and it shifts 24 hours on (aka 4 kerbal days) i miss my manovernode and that is bad for my gameplay.

Basically the game time is being changed to compensate for server downtime. I am not sure if this is a KSP "feature" or a server issue. If it is a server issue, how would one turn this off?

commented

This is actually a feature, not a bug ;)

https://github.com/godarklight/DarkMultiPlayer/blob/master/Client/TimeSyncer.cs#L387-L400
https://github.com/godarklight/DarkMultiPlayer/blob/master/Client/TimeSyncer.cs#L373
https://github.com/godarklight/DarkMultiPlayer/blob/master/Client/TimeSyncer.cs#L442

DMP uses an NTP-style message to figure out how different the server clock is. This can be turned off by setting keepTickingWhileOffline to false, which makes DMPServer take an extra step on the last connect:
https://github.com/godarklight/DarkMultiPlayer/blob/master/Server/Messages/WarpControl.cs#L175-L185