回滚手持武器开火计时逻辑
This commit is contained in:
parent
da650e66a8
commit
30f828e08e
1 changed files with 8 additions and 2 deletions
|
@ -409,18 +409,24 @@ public class ClientEventHandler {
|
||||||
} else {
|
} else {
|
||||||
if (!clientTimer.started()) {
|
if (!clientTimer.started()) {
|
||||||
clientTimer.start();
|
clientTimer.start();
|
||||||
shootClient(player);
|
// 首发瞬间发射
|
||||||
|
clientTimer.setProgress((cooldown + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clientTimer.getProgress() >= cooldown) {
|
if (clientTimer.getProgress() >= cooldown) {
|
||||||
clientTimer.stop();
|
shootClient(player);
|
||||||
|
clientTimer.setProgress((clientTimer.getProgress() - cooldown));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (notInGame()) {
|
if (notInGame()) {
|
||||||
clientTimer.stop();
|
clientTimer.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
if (mode != 0) {
|
||||||
|
clientTimer.stop();
|
||||||
|
}
|
||||||
fireSpread = 0;
|
fireSpread = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue