@@ -21,6 +21,7 @@ using Robust.Shared.Random;
|
||||
using Robust.Shared.Timing;
|
||||
using System.Linq;
|
||||
using Content.Shared.Movement.Systems;
|
||||
using Content.Shared.Random.Helpers;
|
||||
|
||||
namespace Content.Shared.Flash;
|
||||
|
||||
@@ -204,7 +205,8 @@ public abstract class SharedFlashSystem : EntitySystem
|
||||
foreach (var entity in _entSet)
|
||||
{
|
||||
// TODO: Use RandomPredicted https://github.com/space-wizards/RobustToolbox/pull/5849
|
||||
var rand = new System.Random((int)_timing.CurTick.Value + GetNetEntity(entity).Id);
|
||||
var seed = SharedRandomExtensions.HashCodeCombine(new() { (int)_timing.CurTick.Value, GetNetEntity(entity).Id });
|
||||
var rand = new System.Random(seed);
|
||||
if (!rand.Prob(probability))
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user