mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-22 12:38:05 +07:00
Final kick revision (?)
This commit is contained in:
parent
fd352f4ab1
commit
e0c1bb8da1
@ -1,5 +1,5 @@
|
||||
#Autogenerated file. Do not modify.
|
||||
#Sat Mar 24 19:17:04 EDT 2018
|
||||
#Sat Mar 24 19:29:29 EDT 2018
|
||||
version=release
|
||||
androidBuildCode=474
|
||||
name=Mindustry
|
||||
|
@ -172,9 +172,9 @@ public class NetServer extends Module{
|
||||
TraceInfo info = admins.getTrace(Net.getConnection(id).address);
|
||||
Weapon weapon = (Weapon)Upgrade.getByID(packet.weaponid);
|
||||
|
||||
float wtrc = 60f;
|
||||
float wtrc = 60;
|
||||
|
||||
if(!Timers.get(info.uuid + "-weapontrace", wtrc)){
|
||||
if(TimeUtils.millis() < info.lastFastShot + wtrc*1000){
|
||||
info.fastShots ++;
|
||||
|
||||
if(info.fastShots - 10 > (int)(wtrc / (weapon.getReload() / 2f))){
|
||||
@ -182,6 +182,7 @@ public class NetServer extends Module{
|
||||
}
|
||||
}else{
|
||||
info.fastShots = 0;
|
||||
info.lastFastShot = TimeUtils.millis();
|
||||
}
|
||||
|
||||
packet.playerid = connections.get(id).id;
|
||||
@ -264,6 +265,10 @@ public class NetServer extends Module{
|
||||
});
|
||||
|
||||
Net.handleServer(WeaponSwitchPacket.class, (id, packet) -> {
|
||||
TraceInfo info = admins.getTrace(Net.getConnection(id).address);
|
||||
info.fastShots = 0;
|
||||
info.lastFastShot = TimeUtils.millis();
|
||||
|
||||
packet.playerid = connections.get(id).id;
|
||||
Net.sendExcept(id, packet, SendMode.tcp);
|
||||
});
|
||||
|
@ -10,6 +10,7 @@ public class TraceInfo {
|
||||
public boolean android;
|
||||
|
||||
public int fastShots;
|
||||
public long lastFastShot;
|
||||
|
||||
public int totalBlocksBroken;
|
||||
public int structureBlocksBroken;
|
||||
|
Loading…
Reference in New Issue
Block a user