回滚手持武器开火计时逻辑

This commit is contained in:
Atsuihsio 2025-01-14 22:00:29 +08:00
parent da650e66a8
commit 30f828e08e

View file

@ -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;
} }