mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-27 00:40:12 +00:00
add milliseconds to fast forward ui
This commit is contained in:
parent
5aa907d259
commit
32bea79812
@ -76,11 +76,12 @@ namespace QSB.TimeSync
|
||||
var totalSeconds = Mathf.Max(TargetTime - Time.timeSinceLevelLoad, 0f);
|
||||
var minutes = Mathf.FloorToInt(totalSeconds / 60f);
|
||||
var seconds = Mathf.FloorToInt(totalSeconds) % 60;
|
||||
var milliseconds = totalSeconds % 1 * 1000;
|
||||
var text = "";
|
||||
switch (_currentType)
|
||||
{
|
||||
case TimeSyncType.Fastforwarding:
|
||||
text = $"{minutes:D2}:{seconds:D2}"
|
||||
text = $"{minutes:D2}:{seconds:D2}.{milliseconds:000}"
|
||||
+ Environment.NewLine
|
||||
+ "Fast-forwarding to match server time...";
|
||||
break;
|
||||
|
@ -275,6 +275,8 @@ namespace QSB.TimeSync
|
||||
var diff = _serverTime - Time.timeSinceLevelLoad;
|
||||
OWTime.SetTimeScale(Mathf.SmoothStep(MinFastForwardSpeed, MaxFastForwardSpeed, Mathf.Abs(diff) / MaxFastForwardDiff));
|
||||
|
||||
TimeSyncUI.TargetTime = _serverTime;
|
||||
|
||||
if (QSBSceneManager.CurrentScene == OWScene.SolarSystem && _isFirstFastForward)
|
||||
{
|
||||
var spawnPoint = Locator.GetPlayerBody().GetComponent<PlayerSpawner>().GetInitialSpawnPoint().transform;
|
||||
|
Loading…
x
Reference in New Issue
Block a user