调整把按键添加到录像的时机
修复触发了自动保存的最后一个按键本身不会保存到录像里
This commit is contained in:
@@ -494,6 +494,15 @@ local playerActions={
|
|||||||
Player.act_zangiLeft, --19
|
Player.act_zangiLeft, --19
|
||||||
Player.act_zangiRight,--20
|
Player.act_zangiRight,--20
|
||||||
}function Player:pressKey(keyID)
|
}function Player:pressKey(keyID)
|
||||||
|
if self.id==1 then
|
||||||
|
if GAME.recording then
|
||||||
|
local L=GAME.rep
|
||||||
|
ins(L,self.frameRun)
|
||||||
|
ins(L,keyID)
|
||||||
|
elseif self.streamProgress then
|
||||||
|
VK.press(keyID)
|
||||||
|
end
|
||||||
|
end
|
||||||
if self.keyAvailable[keyID]and self.alive then
|
if self.keyAvailable[keyID]and self.alive then
|
||||||
if self.waiting>self.gameEnv.hurry then
|
if self.waiting>self.gameEnv.hurry then
|
||||||
self.waiting=self.gameEnv.hurry
|
self.waiting=self.gameEnv.hurry
|
||||||
@@ -505,18 +514,8 @@ local playerActions={
|
|||||||
playerActions[keyID](self)
|
playerActions[keyID](self)
|
||||||
self.stat.key=self.stat.key+1
|
self.stat.key=self.stat.key+1
|
||||||
end
|
end
|
||||||
if self.id==1 then
|
|
||||||
if GAME.recording then
|
|
||||||
local L=GAME.rep
|
|
||||||
ins(L,self.frameRun)
|
|
||||||
ins(L,keyID)
|
|
||||||
elseif self.streamProgress then
|
|
||||||
VK.press(keyID)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
function Player:releaseKey(keyID)
|
function Player:releaseKey(keyID)
|
||||||
self.keyPressing[keyID]=false
|
|
||||||
if self.id==1 then
|
if self.id==1 then
|
||||||
if GAME.recording then
|
if GAME.recording then
|
||||||
local L=GAME.rep
|
local L=GAME.rep
|
||||||
@@ -526,6 +525,7 @@ function Player:releaseKey(keyID)
|
|||||||
VK.release(keyID)
|
VK.release(keyID)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
self.keyPressing[keyID]=false
|
||||||
end
|
end
|
||||||
function Player:newTask(code,...)
|
function Player:newTask(code,...)
|
||||||
local thread=coroutine.create(code)
|
local thread=coroutine.create(code)
|
||||||
|
|||||||
Reference in New Issue
Block a user