Removed Upgrade class / Buffed units / Bugfixes

This commit is contained in:
Anuken
2018-08-24 09:39:02 -04:00
parent ee835f6514
commit 5e8686db77
15 changed files with 96 additions and 89 deletions

View File

@@ -22,7 +22,6 @@ import io.anuke.mindustry.net.Net;
import io.anuke.mindustry.net.NetConnection;
import io.anuke.mindustry.type.ItemStack;
import io.anuke.mindustry.type.Mech;
import io.anuke.mindustry.type.Upgrade;
import io.anuke.mindustry.type.Weapon;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Tile;
@@ -762,13 +761,13 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
byte mechid = stream.readByte();
int index = stream.readByte();
players[index].readSaveSuper(stream);
players[index].mech = Upgrade.getByID(mechid);
players[index].mech = Mech.getByID(mechid);
players[index].dead = false;
}else if(local){
byte mechid = stream.readByte();
stream.readByte();
readSaveSuper(stream);
mech = Upgrade.getByID(mechid);
mech = Mech.getByID(mechid);
dead = false;
}
}
@@ -804,7 +803,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
boolean boosting = (bools & 4) != 0;
boolean alt = (bools & 8) != 0;
color.set(buffer.readInt());
mech = Upgrade.getByID(buffer.readByte());
mech = Mech.getByID(buffer.readByte());
int mine = buffer.readInt();
spawner = buffer.readInt();
float baseRotation = buffer.readShort() / 2f;

View File

@@ -8,7 +8,6 @@ import io.anuke.mindustry.entities.TileEntity;
import io.anuke.mindustry.entities.Units;
import io.anuke.mindustry.game.Team;
import io.anuke.mindustry.type.AmmoType;
import io.anuke.mindustry.type.Upgrade;
import io.anuke.mindustry.type.Weapon;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.Floor;
@@ -211,7 +210,7 @@ public abstract class GroundUnit extends BaseUnit{
@Override
public void read(DataInput data, long time) throws IOException{
super.read(data, time);
weapon = Upgrade.getByID(data.readByte());
weapon = Weapon.getByID(data.readByte());
}
@Override
@@ -222,7 +221,7 @@ public abstract class GroundUnit extends BaseUnit{
@Override
public void readSave(DataInput stream) throws IOException{
weapon = Upgrade.getByID(stream.readByte());
weapon = Weapon.getByID(stream.readByte());
super.readSave(stream);
}