mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-21 13:17:39 +07:00
Fixed host bug, server failing to kick people firing too fast
This commit is contained in:
@ -25,7 +25,7 @@ allprojects {
|
||||
appName = 'Mindustry'
|
||||
gdxVersion = '1.9.8'
|
||||
aiVersion = '1.8.1'
|
||||
uCoreVersion = '238babe'
|
||||
uCoreVersion = 'a4f1863'
|
||||
|
||||
getVersionString = {
|
||||
String buildVersion = getBuildVersion()
|
||||
|
@ -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
|
||||
|
@ -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