mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-30 22:49:06 +07:00
Fixed healer enemies not healing on multiplayer, blast enemy explosions
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
#Autogenerated file. Do not modify.
|
||||
#Sun Feb 11 19:23:12 EST 2018
|
||||
#Mon Feb 12 14:58:45 EST 2018
|
||||
version=beta
|
||||
androidBuildCode=173
|
||||
androidBuildCode=175
|
||||
name=Mindustry
|
||||
code=3.3
|
||||
build=custom build
|
||||
|
@ -30,7 +30,7 @@ public class Player extends SyncEntity{
|
||||
static final int timerDash = 0;
|
||||
static final int timerShootLeft = 1;
|
||||
static final int timerShootRight = 2;
|
||||
static final int timerRegen = 20;
|
||||
static final int timerRegen = 3;
|
||||
|
||||
public String name = "name";
|
||||
public boolean isAndroid;
|
||||
@ -175,7 +175,7 @@ public class Player extends SyncEntity{
|
||||
|
||||
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 = Mathf.clamp(health, -1, maxhealth);
|
||||
|
@ -53,6 +53,7 @@ public class EnemyType {
|
||||
protected String shootsound = "enemyshoot";
|
||||
protected boolean targetCore = false;
|
||||
protected boolean stopNearCore = true;
|
||||
protected boolean targetClient = false;
|
||||
protected float mass = 1f;
|
||||
|
||||
protected final int timerTarget = timeid ++;
|
||||
@ -145,7 +146,8 @@ public class EnemyType {
|
||||
|
||||
public void move(Enemy enemy){
|
||||
if(Net.client()){
|
||||
enemy.interpolate(); //TODO? better structure for interpolation
|
||||
enemy.interpolate();
|
||||
if(targetClient) updateTargeting(enemy, false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,6 @@ import io.anuke.ucore.entities.Entities;
|
||||
import io.anuke.ucore.graphics.Draw;
|
||||
import io.anuke.ucore.graphics.Hue;
|
||||
import io.anuke.ucore.graphics.Shapes;
|
||||
import io.anuke.ucore.util.Angles;
|
||||
|
||||
import static io.anuke.mindustry.Vars.enemyGroup;
|
||||
|
||||
@ -31,6 +30,7 @@ public class HealerType extends EnemyType {
|
||||
alwaysRotate = false;
|
||||
targetCore = false;
|
||||
stopNearCore = true;
|
||||
targetClient = true;
|
||||
mass = 1.1f;
|
||||
}
|
||||
|
||||
|
@ -242,9 +242,9 @@ public class Fx{
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
blastexplosion = new Effect(16, e -> {
|
||||
blastexplosion = new Effect(14, e -> {
|
||||
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);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
@ -63,7 +63,7 @@ public class DebugFragment implements Fragment {
|
||||
row();
|
||||
new button("spawn", () -> {
|
||||
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();
|
||||
|
Reference in New Issue
Block a user