Fixed healer enemies not healing on multiplayer, blast enemy explosions
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#Autogenerated file. Do not modify.
|
#Autogenerated file. Do not modify.
|
||||||
#Sun Feb 11 19:23:12 EST 2018
|
#Mon Feb 12 14:58:45 EST 2018
|
||||||
version=beta
|
version=beta
|
||||||
androidBuildCode=173
|
androidBuildCode=175
|
||||||
name=Mindustry
|
name=Mindustry
|
||||||
code=3.3
|
code=3.3
|
||||||
build=custom build
|
build=custom build
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class Player extends SyncEntity{
|
|||||||
static final int timerDash = 0;
|
static final int timerDash = 0;
|
||||||
static final int timerShootLeft = 1;
|
static final int timerShootLeft = 1;
|
||||||
static final int timerShootRight = 2;
|
static final int timerShootRight = 2;
|
||||||
static final int timerRegen = 20;
|
static final int timerRegen = 3;
|
||||||
|
|
||||||
public String name = "name";
|
public String name = "name";
|
||||||
public boolean isAndroid;
|
public boolean isAndroid;
|
||||||
@@ -175,7 +175,7 @@ public class Player extends SyncEntity{
|
|||||||
|
|
||||||
float speed = dashing ? (debug ? Player.dashSpeed * 5f : Player.dashSpeed) : Player.speed;
|
float speed = dashing ? (debug ? Player.dashSpeed * 5f : Player.dashSpeed) : Player.speed;
|
||||||
|
|
||||||
if(health < maxhealth && timer.get(timerRegen, 20 ))
|
if(health < maxhealth && timer.get(timerRegen, 20))
|
||||||
health ++;
|
health ++;
|
||||||
|
|
||||||
health = Mathf.clamp(health, -1, maxhealth);
|
health = Mathf.clamp(health, -1, maxhealth);
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ public class EnemyType {
|
|||||||
protected String shootsound = "enemyshoot";
|
protected String shootsound = "enemyshoot";
|
||||||
protected boolean targetCore = false;
|
protected boolean targetCore = false;
|
||||||
protected boolean stopNearCore = true;
|
protected boolean stopNearCore = true;
|
||||||
|
protected boolean targetClient = false;
|
||||||
protected float mass = 1f;
|
protected float mass = 1f;
|
||||||
|
|
||||||
protected final int timerTarget = timeid ++;
|
protected final int timerTarget = timeid ++;
|
||||||
@@ -145,7 +146,8 @@ public class EnemyType {
|
|||||||
|
|
||||||
public void move(Enemy enemy){
|
public void move(Enemy enemy){
|
||||||
if(Net.client()){
|
if(Net.client()){
|
||||||
enemy.interpolate(); //TODO? better structure for interpolation
|
enemy.interpolate();
|
||||||
|
if(targetClient) updateTargeting(enemy, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import io.anuke.ucore.entities.Entities;
|
|||||||
import io.anuke.ucore.graphics.Draw;
|
import io.anuke.ucore.graphics.Draw;
|
||||||
import io.anuke.ucore.graphics.Hue;
|
import io.anuke.ucore.graphics.Hue;
|
||||||
import io.anuke.ucore.graphics.Shapes;
|
import io.anuke.ucore.graphics.Shapes;
|
||||||
import io.anuke.ucore.util.Angles;
|
|
||||||
|
|
||||||
import static io.anuke.mindustry.Vars.enemyGroup;
|
import static io.anuke.mindustry.Vars.enemyGroup;
|
||||||
|
|
||||||
@@ -31,6 +30,7 @@ public class HealerType extends EnemyType {
|
|||||||
alwaysRotate = false;
|
alwaysRotate = false;
|
||||||
targetCore = false;
|
targetCore = false;
|
||||||
stopNearCore = true;
|
stopNearCore = true;
|
||||||
|
targetClient = true;
|
||||||
mass = 1.1f;
|
mass = 1.1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -242,9 +242,9 @@ public class Fx{
|
|||||||
Draw.reset();
|
Draw.reset();
|
||||||
}),
|
}),
|
||||||
|
|
||||||
blastexplosion = new Effect(16, e -> {
|
blastexplosion = new Effect(14, e -> {
|
||||||
Lines.stroke(1.2f - e.ifract());
|
Lines.stroke(1.2f - e.ifract());
|
||||||
Draw.color(Color.WHITE, Color.SCARLET, e.ifract());
|
Draw.color(Color.WHITE, lightOrange, e.ifract());
|
||||||
Lines.circle(e.x, e.y, 1.5f + e.ifract() * 9f);
|
Lines.circle(e.x, e.y, 1.5f + e.ifract() * 9f);
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class DebugFragment implements Fragment {
|
|||||||
row();
|
row();
|
||||||
new button("spawn", () -> {
|
new button("spawn", () -> {
|
||||||
for(int i = 0; i < 30; i ++){
|
for(int i = 0; i < 30; i ++){
|
||||||
new Enemy(EnemyTypes.blast).set(player.x + Mathf.range(50f), player.y + Mathf.range(50f)).add();
|
new Enemy(EnemyTypes.healer).set(player.x + Mathf.range(50f), player.y + Mathf.range(50f)).add();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
row();
|
row();
|
||||||
|
|||||||
Reference in New Issue
Block a user