Rewrote path random selection to use built-in rangeseeded call, prevent integer overflow error

This commit is contained in:
c0ffee 2024-05-01 19:41:27 -07:00
parent 6606395223
commit abb3c1fe18
2 changed files with 1 additions and 1 deletions

View file

@ -16,7 +16,7 @@ namespace Rimworld_Animations
for (int i = 0; i < loops; i++)
{
GroupAnimationDef selectedDef = paths[((seed * 341 + 1582 * i) % 15823) % paths.Count];
GroupAnimationDef selectedDef = paths[Rand.RangeSeeded(0, paths.Count, seed + i)];
animationDefs.AddRange(selectedDef.GetAllAnimationsForActor(actorNumber, seed));