fix: Fixes speed issues (#959)

- [X] Removes all speeds in constructors since _they aren't used anyways_.
- [X] Adjusted timers according to the _time transformations in RunUO_.
This commit is contained in:
Kamron Batman 2022-03-15 10:18:27 -07:00 • committed by GitHub
parent 16c4268b54
commit 1ec3636951
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
73 changed files with 755 additions and 1511 deletions

View file

@ -1019,6 +1019,21 @@ namespace Server
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool RandomBool() => RandomSources.Source.NextBool();
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double RandomMinMax(double min, double max)
{
if (min > max)
{
(min, max) = (max, min);
}
else if (min == max)
{
return min;
}
return min + RandomSources.Source.NextDouble() * (max - min);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint RandomMinMax(uint min, uint max)
{