Misc minor fixes
This commit is contained in:
@@ -13,6 +13,7 @@ public class MoveEffectAbility extends Ability{
|
||||
public boolean rotateEffect = false;
|
||||
public float effectParam = 3f;
|
||||
public boolean teamColor = false;
|
||||
public boolean parentizeEffects;
|
||||
public Color color = Color.white;
|
||||
public Effect effect = Fx.missileTrail;
|
||||
|
||||
@@ -36,7 +37,7 @@ public class MoveEffectAbility extends Ability{
|
||||
if(unit.vel.len2() >= minVelocity * minVelocity && (counter >= interval)){
|
||||
Tmp.v1.trns(unit.rotation - 90f, x, y);
|
||||
counter %= interval;
|
||||
effect.at(Tmp.v1.x + unit.x, Tmp.v1.y + unit.y, rotateEffect ? unit.rotation : effectParam, teamColor ? unit.team.color : color);
|
||||
effect.at(Tmp.v1.x + unit.x, Tmp.v1.y + unit.y, rotateEffect ? unit.rotation : effectParam, teamColor ? unit.team.color : color, parentizeEffects ? unit : null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package mindustry.entities.part;
|
||||
import arc.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.graphics.*;
|
||||
@@ -83,7 +84,7 @@ public class RegionPart extends DrawPart{
|
||||
//can be null
|
||||
var region = drawRegion ? regions[Math.min(i, regions.length - 1)] : null;
|
||||
float sign = (i == 0 ? 1 : -1) * params.sideMultiplier;
|
||||
Tmp.v1.set((x + mx) * sign, y + my).rotate(params.rotation - 90);
|
||||
Tmp.v1.set((x + mx) * sign, y + my).rotateRadExact((params.rotation - 90) * Mathf.degRad);
|
||||
|
||||
float
|
||||
rx = params.x + Tmp.v1.x,
|
||||
@@ -125,7 +126,7 @@ public class RegionPart extends DrawPart{
|
||||
for(int s = 0; s < len; s++){
|
||||
int i = (params.sideOverride == -1 ? s : params.sideOverride);
|
||||
float sign = (i == 1 ? -1 : 1) * params.sideMultiplier;
|
||||
Tmp.v1.set((x + mx) * sign, y + my).rotate(params.rotation - 90);
|
||||
Tmp.v1.set((x + mx) * sign, y + my).rotateRadExact((params.rotation - 90) * Mathf.degRad);
|
||||
|
||||
childParam.set(params.warmup, params.reload, params.smoothReload, params.heat, params.recoil, params.charge, params.x + Tmp.v1.x, params.y + Tmp.v1.y, i * sign + mr * sign + params.rotation);
|
||||
childParam.sideMultiplier = params.sideMultiplier;
|
||||
|
||||
@@ -125,10 +125,7 @@ public class ImpactReactor extends PowerGenerator{
|
||||
Draw.blend();
|
||||
|
||||
Draw.color();
|
||||
|
||||
Draw.rect(region, x, y);
|
||||
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user