Fixed healer enemies not healing on multiplayer, blast enemy explosions

This commit is contained in:
Anuken
2018-02-12 15:03:51 -05:00
parent 3f8e6e85bd
commit 4e004d4973
6 changed files with 11 additions and 9 deletions
@@ -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;
}