Fixed host bug, server failing to kick people firing too fast

This commit is contained in:
Anuken
2018-03-28 00:22:07 -04:00
parent e0c1bb8da1
commit c54df7cbd1
3 changed files with 5 additions and 5 deletions

View File

@ -25,7 +25,7 @@ allprojects {
appName = 'Mindustry'
gdxVersion = '1.9.8'
aiVersion = '1.8.1'
uCoreVersion = '238babe'
uCoreVersion = 'a4f1863'
getVersionString = {
String buildVersion = getBuildVersion()

View File

@ -1,7 +1,7 @@
#Autogenerated file. Do not modify.
#Sat Mar 24 19:29:29 EDT 2018
#Wed Mar 28 00:20:39 EDT 2018
version=release
androidBuildCode=474
androidBuildCode=476
name=Mindustry
code=3.5
build=35

View File

@ -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{