mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
* refactor DeltaV/deltav resources to _DV * change DeltaV namespaces to _DV * add space before all DeltaV comments * update xamls * fix and move arena parallax to _DV * more fix * refactor even more stuff * fix the grid fills --------- Co-authored-by: deltanedas <@deltanedas:kde.org>
25 lines
785 B
C#
25 lines
785 B
C#
using Content.Shared._DV.TapeRecorder.Systems;
|
|
|
|
namespace Content.Client._DV.TapeRecorder;
|
|
|
|
/// <summary>
|
|
/// Required for client side prediction stuff
|
|
/// </summary>
|
|
public sealed class TapeRecorderSystem : SharedTapeRecorderSystem
|
|
{
|
|
private TimeSpan _lastTickTime = TimeSpan.Zero;
|
|
|
|
public override void Update(float frameTime)
|
|
{
|
|
if (!Timing.IsFirstTimePredicted)
|
|
return;
|
|
|
|
//We need to know the exact time period that has passed since the last update to ensure the tape position is sync'd with the server
|
|
//Since the client can skip frames when lagging, we cannot use frameTime
|
|
var realTime = (float) (Timing.CurTime - _lastTickTime).TotalSeconds;
|
|
_lastTickTime = Timing.CurTime;
|
|
|
|
base.Update(realTime);
|
|
}
|
|
}
|