Fix holding block action
This commit is contained in:
parent
0860c30cfd
commit
c77dd14e09
|
@ -492,7 +492,7 @@ func (g *Game) UpdateByInputs(inputs []InputBits) {
|
|||
}
|
||||
if g.Players[i].ActionTicksLeft == 0 {
|
||||
// Hold block.
|
||||
if input.isButtonOn(ButtonBlock) {
|
||||
if g.Players[i].Action == component.ActionBlock && input.isButtonOn(ButtonBlock) {
|
||||
g.Players[i].ActionTicksLeft = len(component.AllPlayerFrames[component.ActionBlock])
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue