Minor bugfixes

This commit is contained in:
Anuken
2020-12-01 12:48:26 -05:00
parent fcaf1e49cb
commit 305e2642ba
3 changed files with 4 additions and 3 deletions

View File

@@ -347,7 +347,7 @@ public abstract class BulletType extends Content{
bullet.damage = (damage < 0 ? this.damage : damage) * bullet.damageMultiplier();
bullet.add();
if(keepVelocity && owner instanceof Velc) bullet.vel.add(((Velc)owner).vel().x, ((Velc)owner).vel().y);
if(keepVelocity && owner instanceof Velc v) bullet.vel.add(v.vel().x, v.vel().y);
return bullet;
}
@@ -357,6 +357,7 @@ public abstract class BulletType extends Content{
@Remote(called = Loc.server, unreliable = true)
public static void createBullet(BulletType type, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl){
if(type == null) return;
type.create(null, team, x, y, angle, damage, velocityScl, lifetimeScl, null);
}
}

View File

@@ -296,7 +296,7 @@ public class TypeIO{
if(control instanceof Player p){
write.b(0);
write.i(p.id);
}else if(control instanceof FormationAI form){
}else if(control instanceof FormationAI form && form.leader != null){
write.b(1);
write.i(form.leader.id);
}else if(control instanceof LogicAI logic && logic.controller != null){

View File

@@ -340,7 +340,7 @@ public class SectorDamage{
}
if(bossGroup != null){
float bossMult = 1.1f;
float bossMult = 1.2f;
//calculate first boss appearaance
for(int wave = state.wave; wave < state.wave + 60; wave++){
int spawned = bossGroup.getSpawned(wave - 1);