From 611ac6cebdd26badd014ee47e4478b9532862a9d Mon Sep 17 00:00:00 2001 From: RandomityGuy <31925790+RandomityGuy@users.noreply.github.com> Date: Tue, 11 Feb 2025 12:36:31 +0530 Subject: [PATCH] limit replay size --- src/Replay.hx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Replay.hx b/src/Replay.hx index a15d909e..8f614fd8 100644 --- a/src/Replay.hx +++ b/src/Replay.hx @@ -13,6 +13,7 @@ import h3d.Quat; import h3d.Vector; import src.Util; import src.Console; +import src.MarbleGame; enum ReplayMarbleState { UsedPowerup; @@ -289,6 +290,11 @@ class Replay { } public function endFrame() { + // Do not record frames beyond par time/5 minutes to limit file size, if we aren't explicitly recording + if (!MarbleGame.instance.toRecord && currentRecordFrame.clockTime > Math.min(300, MarbleGame.instance.world.mission.qualifyTime)) { + currentRecordFrame = null; + return; + } if (currentRecordFrame != null) frames.push(currentRecordFrame); currentRecordFrame = null;