Multiplayer bugfixes / Balancing

This commit is contained in:
Anuken
2019-04-04 14:46:41 -04:00
parent bab87c0da8
commit 2d18df2011
14 changed files with 56 additions and 50 deletions
@@ -133,7 +133,7 @@ public class Bullet extends SolidEntity implements DamageTrait, ScaleTrait, Pool
public float damageMultiplier(){
if(owner instanceof Unit){
return type.damage * ((Unit) owner).getDamageMultipler();
return ((Unit) owner).getDamageMultipler();
}
if(owner instanceof Lightning && data instanceof Float){
@@ -357,6 +357,8 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
interpolator.read(lastx, lasty, x, y, rotation);
rotation = lastrot;
x = lastx;
y = lasty;
}
public void onSuperDeath(){
@@ -211,8 +211,6 @@ public abstract class GroundUnit extends BaseUnit{
if(tile == targetTile) return;
float angle = angleTo(targetTile);
velocity.add(vec.trns(angleTo(targetTile), type.speed*Time.delta()));
if(Units.invalidateTarget(target, this)){
rotation = Mathf.slerpDelta(rotation, baseRotation, type.rotatespeed);
@@ -237,8 +235,6 @@ public abstract class GroundUnit extends BaseUnit{
if(tile == targetTile || core == null || dst(core) < 90f) return;
float angle = angleTo(targetTile);
velocity.add(vec.trns(angleTo(targetTile), type.speed*Time.delta()));
rotation = Mathf.slerpDelta(rotation, baseRotation, type.rotatespeed);
}
@@ -879,10 +879,10 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
interpolator.read(lastx, lasty, x, y, rotation, baseRotation);
rotation = lastrot;
x = lastx;
y = lasty;
if(isLocal){
x = lastx;
y = lasty;
velocity.x = lastvx;
velocity.y = lastvy;
}else{
@@ -95,7 +95,9 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
@Override
public void damage(float amount){
super.damage(calculateDamage(amount));
if(!Net.client()){
super.damage(calculateDamage(amount));
}
hitTime = hitDuration;
}