P118_ Game Timer
P118_1 Formet And Set Time Text
- ABlasterPlayerController::SetHUDMatchCountdown().

P118_2 计算剩余时间
- 我们目前在 PlayerController 做的倒计时逻辑, 之后会把其放到 Game Mode 中 , 这也许就是问题所在.

P118_3 问题
- 各端的时间都不是同步的.
- GetWorld()->GetTimeSeconds() 每台机器都不一样.

P119_Syncing Client and Server Time
- 由于本地测试联网功能各个端没什么延迟 , 所以我们在 ABlasterPlayerController::ReceivedPlayer() 初始化的同步对局时间会失效 , 在5秒后才会同步时间.
- 整体上逻辑代码很复杂 , 其实就是通过获取 Client=>Server=>Client 的网络传输时间预估一下服务器当前时间.整体的传输时间保存在局部变量 RoundTripTime 中.
- 通过估计的服务器当前时间 = 服务端调用 ClientRPC 的时间 + RoundTripTime / 2.0f;
- 然后估算 服务端和客户端的延迟.作为参考的差值 Δ.
- 当每次设置HUD时 , 预估的当前服务器事件 = 当前时间 + Δ.
- 这个和我们手动写附加逻辑差不多 , 都是计算初始的向量插值Δ , 再每帧加上这个Δ.
P119_1 override PC::ReceivedPlayer()
- i'd like to sync up as early as we possibly can.
- Now Received player is the earliest we can possibly get the time from the server.
- So that's where we can send our request On Initializtion.

P119_2 PC::Tick()
- But I'd like to also do this periodically , just in case we get some drift the server time and the client time.
- That way we can update our client server delta , so we can make a float to determin how often we can sync the server.

P119_3 PC::CheckTimeSync()

P119_4 PC::ServerRequestServerTime

P120_5 PC::ClientReportServerTime

P120_6 PC::GetServerTime

P120_7 Set HUD
- 将原本减去当前客户端时间的逻辑,变为减预估的服务器时间.

P120 Match State
P121 On Match State Set
P122 Warmup Timer
P123 Updateing Warmup Time
P124 Custom Match States
P125 Cooldown Announcement
P126 Restart Game
P127 Blaster Game State