test tweak
parent
f05b7f725d
commit
dea3ad591e
|
@ -1028,11 +1028,13 @@ namespace Tests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool timeDilationActive;
|
||||||
class ReadDilatedDeltaTimeEngine : Engine
|
class ReadDilatedDeltaTimeEngine : Engine
|
||||||
{
|
{
|
||||||
public override void Update(double dt)
|
public override void Update(double dt)
|
||||||
{
|
{
|
||||||
dilatedDeltaTime = dt;
|
dilatedDeltaTime = dt;
|
||||||
|
timeDilationActive = TimeDilationActive;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1051,10 +1053,12 @@ namespace Tests
|
||||||
world.Update(0.5); // 0.3 and 0.375
|
world.Update(0.5); // 0.3 and 0.375
|
||||||
|
|
||||||
dilatedDeltaTime.Should().BeApproximately(0.3375, 0.01);
|
dilatedDeltaTime.Should().BeApproximately(0.3375, 0.01);
|
||||||
|
timeDilationActive.Should().BeTrue();
|
||||||
|
|
||||||
world.Update(5);
|
world.Update(5);
|
||||||
|
|
||||||
dilatedDeltaTime.Should().BeApproximately(5, 0.01);
|
dilatedDeltaTime.Should().BeApproximately(5, 0.01);
|
||||||
|
timeDilationActive.Should().BeFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
static double undilatedDeltaTime;
|
static double undilatedDeltaTime;
|
||||||
|
|
Loading…
Reference in New Issue