调整远程玩家加速速率,远程玩家时间显示暂时改为运行帧数/60
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
local max,min=math.max,math.min
|
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 rem=table.remove
|
||||||
local assert,resume,status=assert,coroutine.resume,coroutine.status
|
local assert,resume,status=assert,coroutine.resume,coroutine.status
|
||||||
|
|
||||||
@@ -411,13 +411,12 @@ end
|
|||||||
function update.remote_alive(P,dt)
|
function update.remote_alive(P,dt)
|
||||||
local frameRate=(P.stream[#P.stream-1]or 0)-P.frameRun
|
local frameRate=(P.stream[#P.stream-1]or 0)-P.frameRun
|
||||||
frameRate=
|
frameRate=
|
||||||
frameRate<20 and 1 or
|
frameRate<26 and 1 or
|
||||||
frameRate<30 and rnd(2)or
|
frameRate<50 and 2 or
|
||||||
frameRate<60 and 2 or
|
frameRate<80 and 3 or
|
||||||
frameRate<90 and 3 or
|
|
||||||
frameRate<120 and 5 or
|
frameRate<120 and 5 or
|
||||||
frameRate<150 and 7 or
|
frameRate<160 and 7 or
|
||||||
frameRate<180 and 10 or
|
frameRate<200 and 10 or
|
||||||
20
|
20
|
||||||
for _=1,frameRate do
|
for _=1,frameRate do
|
||||||
local eventTime=P.stream[P.streamProgress]
|
local eventTime=P.stream[P.streamProgress]
|
||||||
@@ -460,6 +459,7 @@ function update.remote_alive(P,dt)
|
|||||||
P.streamProgress=P.streamProgress+2
|
P.streamProgress=P.streamProgress+2
|
||||||
else--No event now, run one frame
|
else--No event now, run one frame
|
||||||
update.alive(P,dt/frameRate)
|
update.alive(P,dt/frameRate)
|
||||||
|
P.stat.time=P.frameRun/60
|
||||||
end
|
end
|
||||||
else--Pause state, no actions, quit loop
|
else--Pause state, no actions, quit loop
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user