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:
parent
16c4268b54
commit
1ec3636951
73 changed files with 755 additions and 1511 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue