beyond-all-reason / spring

A powerful free cross-platform RTS game engine
https://beyond-all-reason.github.io/spring/
Other
210 stars 100 forks source link

Add synced `wupget:PreGameTimekeeping(n)` #1458

Open sprunk opened 5 months ago

sprunk commented 5 months ago

Bill of materials to be done before starting this ticket:


The request is to produce a synced event during the pre-game (placing startpoints) phase for timekeeping purposes. The GameFrame callin doesn't get called during pre-game and it's the only thing for timekeeping.

The pre-game phase has correct timing in a replay though so there must be something going on in the network protocol. IIRC it's just gameframe -1 or 0 packets that the client knows to ignore. If that is the case then these could get exposed to synced Lua somehow. Make it a separate callin though and not GameFrame.