mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-21 18:40:03 +00:00
add timescale cap
This commit is contained in:
parent
c8dd5a8dfa
commit
9e9fbbee81
@ -261,6 +261,16 @@ namespace QSB.TimeSync
|
|||||||
}
|
}
|
||||||
|
|
||||||
var mappedTimescale = diff.Map(-PauseOrFastForwardThreshold, PauseOrFastForwardThreshold, 1 + TimescaleBounds, 1 - TimescaleBounds);
|
var mappedTimescale = diff.Map(-PauseOrFastForwardThreshold, PauseOrFastForwardThreshold, 1 + TimescaleBounds, 1 - TimescaleBounds);
|
||||||
|
if (mappedTimescale > 100f)
|
||||||
|
{
|
||||||
|
DebugLog.ToConsole($"Warning - CheckTimeDifference() returned over 100 - should have switched into fast-forward!", MessageType.Warning);
|
||||||
|
mappedTimescale = 100f;
|
||||||
|
}
|
||||||
|
if (mappedTimescale < 0)
|
||||||
|
{
|
||||||
|
DebugLog.ToConsole($"Warning - CheckTimeDifference() returned below 0 - should have switched into pausing!", MessageType.Warning);
|
||||||
|
mappedTimescale = 0f;
|
||||||
|
}
|
||||||
OWTime.SetTimeScale(mappedTimescale);
|
OWTime.SetTimeScale(mappedTimescale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user