mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-22 05:38:19 +07:00
Updated uCore
This commit is contained in:
@ -25,7 +25,7 @@ allprojects {
|
||||
appName = 'Mindustry'
|
||||
gdxVersion = '1.9.8'
|
||||
aiVersion = '1.8.1'
|
||||
uCoreVersion = 'c5d47cc'
|
||||
uCoreVersion = 'a41b4c2'
|
||||
|
||||
getVersionString = {
|
||||
String buildVersion = getBuildVersion()
|
||||
|
@ -1,7 +1,7 @@
|
||||
#Autogenerated file. Do not modify.
|
||||
#Mon Apr 02 15:23:03 EDT 2018
|
||||
#Tue Apr 03 23:58:20 EDT 2018
|
||||
version=release
|
||||
androidBuildCode=497
|
||||
androidBuildCode=501
|
||||
name=Mindustry
|
||||
code=3.5
|
||||
build=37
|
||||
build=custom build
|
||||
|
@ -174,15 +174,14 @@ public class NetServer extends Module{
|
||||
|
||||
float wtrc = 60;
|
||||
|
||||
if(TimeUtils.millis() < info.lastFastShot + (int)(wtrc/60f*1000)){
|
||||
info.fastShots ++;
|
||||
if(!Timers.get("fastshoot-" + id + "-" + weapon.id, wtrc)){
|
||||
info.fastShots.getAndIncrement(weapon.id, 0, 1);
|
||||
|
||||
if(info.fastShots - 6 > (int)(wtrc / (weapon.getReload() / 2f))){
|
||||
if(info.fastShots.get(weapon.id, 0) > (int)(wtrc / (weapon.getReload() / 2f)) + 2){
|
||||
kick(id, KickReason.kick);
|
||||
}
|
||||
}else{
|
||||
info.fastShots = 0;
|
||||
info.lastFastShot = TimeUtils.millis();
|
||||
info.fastShots.put(weapon.id, 0);
|
||||
}
|
||||
|
||||
packet.playerid = connections.get(id).id;
|
||||
@ -266,8 +265,6 @@ 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);
|
||||
|
@ -113,6 +113,8 @@ public class NetEvents {
|
||||
packet.rotation = angle;
|
||||
packet.playerid = Vars.player.id;
|
||||
Net.send(packet, SendMode.udp);
|
||||
|
||||
handleWeaponSwitch();
|
||||
}
|
||||
|
||||
public static void handlePlace(int x, int y, Block block, int rotation){
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.anuke.mindustry.net;
|
||||
|
||||
import com.badlogic.gdx.utils.IntIntMap;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.blocks.Blocks;
|
||||
|
||||
@ -9,8 +10,7 @@ public class TraceInfo {
|
||||
public boolean modclient;
|
||||
public boolean android;
|
||||
|
||||
public int fastShots;
|
||||
public long lastFastShot;
|
||||
public IntIntMap fastShots = new IntIntMap();
|
||||
|
||||
public int totalBlocksBroken;
|
||||
public int structureBlocksBroken;
|
||||
|
Reference in New Issue
Block a user