test tweak

pull/5/head
thatcosmonaut 2019-11-22 13:18:43 -08:00
parent f05b7f725d
commit dea3ad591e
1 changed files with 4 additions and 0 deletions

View File

@ -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;