mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-20 20:57:59 +07:00
Fixed host bug, server failing to kick people firing too fast
This commit is contained in:
@ -174,10 +174,10 @@ public class NetServer extends Module{
|
||||
|
||||
float wtrc = 60;
|
||||
|
||||
if(TimeUtils.millis() < info.lastFastShot + wtrc*1000){
|
||||
if(TimeUtils.millis() < info.lastFastShot + (int)(wtrc/60f*1000)){
|
||||
info.fastShots ++;
|
||||
|
||||
if(info.fastShots - 10 > (int)(wtrc / (weapon.getReload() / 2f))){
|
||||
if(info.fastShots - 6 > (int)(wtrc / (weapon.getReload() / 2f))){
|
||||
kick(id, KickReason.kick);
|
||||
}
|
||||
}else{
|
||||
|
Reference in New Issue
Block a user