From 3cfa230d2b398e58c643ac8baa4cc47662e96934 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 9 Jun 2021 14:53:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=BF=9C=E7=A8=8B=E7=8E=A9?= =?UTF-8?q?=E5=AE=B6=E5=8A=A0=E9=80=9F=E9=80=9F=E7=8E=87=EF=BC=8C=E8=BF=9C?= =?UTF-8?q?=E7=A8=8B=E7=8E=A9=E5=AE=B6=E6=97=B6=E9=97=B4=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=9A=82=E6=97=B6=E6=94=B9=E4=B8=BA=E8=BF=90=E8=A1=8C=E5=B8=A7?= =?UTF-8?q?=E6=95=B0/60?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/update.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/parts/player/update.lua b/parts/player/update.lua index feace019..8fad1a8d 100644 --- a/parts/player/update.lua +++ b/parts/player/update.lua @@ -1,5 +1,5 @@ local max,min=math.max,math.min -local int,abs,rnd=math.floor,math.abs,math.random +local int,abs=math.floor,math.abs local rem=table.remove local assert,resume,status=assert,coroutine.resume,coroutine.status @@ -411,13 +411,12 @@ end function update.remote_alive(P,dt) local frameRate=(P.stream[#P.stream-1]or 0)-P.frameRun frameRate= - frameRate<20 and 1 or - frameRate<30 and rnd(2)or - frameRate<60 and 2 or - frameRate<90 and 3 or + frameRate<26 and 1 or + frameRate<50 and 2 or + frameRate<80 and 3 or frameRate<120 and 5 or - frameRate<150 and 7 or - frameRate<180 and 10 or + frameRate<160 and 7 or + frameRate<200 and 10 or 20 for _=1,frameRate do local eventTime=P.stream[P.streamProgress] @@ -460,6 +459,7 @@ function update.remote_alive(P,dt) P.streamProgress=P.streamProgress+2 else--No event now, run one frame update.alive(P,dt/frameRate) + P.stat.time=P.frameRun/60 end else--Pause state, no actions, quit loop break