刷新玩家stat时间和帧数的代码移到update函数外部
This commit is contained in:
@@ -1844,11 +1844,6 @@ local function update_alive(P)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
if P.timing then
|
|
||||||
S.time=S.time+1/60
|
|
||||||
S.frame=S.frame+1
|
|
||||||
end
|
|
||||||
|
|
||||||
--Calculate key speed
|
--Calculate key speed
|
||||||
do
|
do
|
||||||
local v=0
|
local v=0
|
||||||
@@ -2160,16 +2155,24 @@ function Player:update(dt)
|
|||||||
update_remote_alive(self,dt)
|
update_remote_alive(self,dt)
|
||||||
else
|
else
|
||||||
self.trigFrame=self.trigFrame+(self.gameEnv.FTLock and dt*60 or 1)
|
self.trigFrame=self.trigFrame+(self.gameEnv.FTLock and dt*60 or 1)
|
||||||
while self.trigFrame>=1 do
|
if self.alive then
|
||||||
if self.alive then
|
if self.timing then
|
||||||
update_alive(self)
|
local S=self.stat
|
||||||
if self.type=='computer'then
|
S.frame=S.frame+1
|
||||||
self.bot:update(dt)
|
S.time=S.time+dt
|
||||||
end
|
end
|
||||||
else
|
while self.trigFrame>=1 do
|
||||||
update_dead(self)
|
update_alive(self)
|
||||||
|
self.trigFrame=self.trigFrame-1
|
||||||
|
end
|
||||||
|
if self.type=='computer'then
|
||||||
|
self.bot:update(dt)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
while self.trigFrame>=1 do
|
||||||
|
update_dead(self)
|
||||||
|
self.trigFrame=self.trigFrame-1
|
||||||
end
|
end
|
||||||
self.trigFrame=self.trigFrame-1
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
_updateFX(self,dt)
|
_updateFX(self,dt)
|
||||||
|
|||||||
Reference in New Issue
Block a user