Input: Fix isRepeated off-by-one error and do small optim.
This commit is contained in:
parent
d2d86e7002
commit
10186e8dcc
|
@ -601,12 +601,11 @@ void Input::update()
|
||||||
|
|
||||||
bool repeated;
|
bool repeated;
|
||||||
if (rgssVer >= 2)
|
if (rgssVer >= 2)
|
||||||
repeated = p->repeatCount >= 24 && (p->repeatCount % 6) == 0;
|
repeated = p->repeatCount >= 23 && ((p->repeatCount+1) % 6) == 0;
|
||||||
else
|
else
|
||||||
repeated = p->repeatCount >= 16 && (p->repeatCount % 4) == 0;
|
repeated = p->repeatCount >= 15 && ((p->repeatCount+1) % 4) == 0;
|
||||||
|
|
||||||
if (repeated)
|
p->getState(p->repeating).repeated |= repeated;
|
||||||
p->getState(p->repeating).repeated = true;
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue