SHA256
forked from ADOFAIEditorForum/ADOFAIRenderer
Fix Random Seed Parsing and Assignment to RenderSettings in RenderButton
This commit is contained in:
1 parent
f4062912a0
commit
6ca0e5f6e1
2 files changed
+23
-4
No files matched your search
@@ -10,6 +10,7 @@ using ADOFAIRenderer.Util.FFmpeg;
|
||||
using MelonLoader;
|
||||
using MelonLoader.Utils;
|
||||
using UnityEngine;
|
||||
using Random = UnityEngine.Random;
|
||||
using ThreadPriority = System.Threading.ThreadPriority;
|
||||
|
||||
namespace ADOFAIRenderer.Core
|
||||
@@ -63,8 +64,9 @@ namespace ADOFAIRenderer.Core
|
||||
public string Codec;
|
||||
public double EndWaitTime;
|
||||
public bool ShowHitText;
|
||||
public int? RandomSeed;
|
||||
|
||||
public RenderSettings(double targetFPS, double videoFPS, int renderWidth, int renderHeight, int bitrate, string codec, double endWaitTime, bool showHitText)
|
||||
public RenderSettings(double targetFPS, double videoFPS, int renderWidth, int renderHeight, int bitrate, string codec, double endWaitTime, bool showHitText, int? randomSeed)
|
||||
{
|
||||
TargetFPS = targetFPS;
|
||||
VideoFPS = videoFPS;
|
||||
@@ -76,6 +78,8 @@ namespace ADOFAIRenderer.Core
|
||||
Codec = codec;
|
||||
EndWaitTime = endWaitTime;
|
||||
ShowHitText = showHitText;
|
||||
|
||||
RandomSeed = randomSeed;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,6 +352,7 @@ namespace ADOFAIRenderer.Core
|
||||
GCS.nextSpeedRun = 1;
|
||||
GCS.customLevelIndex = 0;
|
||||
|
||||
if (Configuration.RandomSeed.HasValue) Random.InitState(Configuration.RandomSeed.Value);
|
||||
ADOBase.loader.LoadSceneWithTransition(WipeDirection.StartsFromRight, "scnGame");
|
||||
skipPressToStart = true;
|
||||
_renderSetup = true;
|
||||
|
||||
Reference in new issue
Block a user