Simsilica/SimEthereal

Regression in 1.3.0 SynchedTimeSource

MeFisto94 opened this issue · 2 comments

In an attempt to update the sim-eth-es example to support SimEthereal 1.3.0, I've stumbled across the breaking changes introduced in c6272ff
The Problem is that EtherealClient#getTimeSource has a return type of "TimeSource" where stateReciever clearly has a RemoteTimeSource (implementing SynchedTimeSource) as it's timeSource.

I guess it's only a simple overlooking, but it would be nice to fix this so a cast is not necessary.

What cast? What breaking change? Can you be more specific?

Which code is not ok with a plain TimeSource? And if your answer is the stats debug state... then that state should be casting because it's trying to do non-standard under-the-covers views of stuff.

Well the "Breaking Change" was that the TimeSource Interface was split into TimeSource and SynchedTimeSource and yeah, the TimeSequenceState requires getOffset(),

however I am not sure that casting is the answer because StateReciever always has a RemoteTimeSource so it's guaranteed to be a SynchedTimeSource.
Any other code might also want to rely on the offset (maybe some sort of prediction), but that's out of my knowledge for now