mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-05 13:08:20 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f04e763667
@ -19,7 +19,7 @@ abstract class StatusComp implements Posc, Flyingc{
|
||||
private Seq<StatusEntry> statuses = new Seq<>();
|
||||
private transient Bits applied = new Bits(content.getBy(ContentType.status).size);
|
||||
|
||||
@ReadOnly transient float speedMultiplier = 1, damageMultiplier = 1, healthMultiplier = 1, reloadMultiplier = 1, buildSpeedMultiplier = 1;
|
||||
@ReadOnly transient float speedMultiplier = 1, damageMultiplier = 1, healthMultiplier = 1, reloadMultiplier = 1, buildSpeedMultiplier = 1, dragMultiplier = 1;
|
||||
@ReadOnly transient boolean disarmed = false;
|
||||
|
||||
@Import UnitType type;
|
||||
@ -116,7 +116,7 @@ abstract class StatusComp implements Posc, Flyingc{
|
||||
}
|
||||
|
||||
applied.clear();
|
||||
speedMultiplier = damageMultiplier = healthMultiplier = reloadMultiplier = buildSpeedMultiplier = 1f;
|
||||
speedMultiplier = damageMultiplier = healthMultiplier = reloadMultiplier = buildSpeedMultiplier = dragMultiplier = 1f;
|
||||
disarmed = false;
|
||||
|
||||
if(statuses.isEmpty()) return;
|
||||
@ -140,6 +140,7 @@ abstract class StatusComp implements Posc, Flyingc{
|
||||
damageMultiplier *= entry.effect.damageMultiplier;
|
||||
reloadMultiplier *= entry.effect.reloadMultiplier;
|
||||
buildSpeedMultiplier *= entry.effect.buildSpeedMultiplier;
|
||||
dragMultiplier *= entry.effect.dragMultiplier;
|
||||
|
||||
disarmed |= entry.effect.disarm;
|
||||
|
||||
|
@ -34,7 +34,7 @@ import static mindustry.logic.GlobalConstants.*;
|
||||
abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, Itemsc, Rotc, Unitc, Weaponsc, Drawc, Boundedc, Syncc, Shieldc, Commanderc, Displayable, Senseable, Ranged, Minerc, Builderc{
|
||||
|
||||
@Import boolean hovering, dead, disarmed;
|
||||
@Import float x, y, rotation, elevation, maxHealth, drag, armor, hitSize, health, ammo, minFormationSpeed;
|
||||
@Import float x, y, rotation, elevation, maxHealth, drag, armor, hitSize, health, ammo, minFormationSpeed, dragMultiplier;
|
||||
@Import Team team;
|
||||
@Import int id;
|
||||
@Import @Nullable Tile mineTile;
|
||||
@ -325,7 +325,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
}
|
||||
}
|
||||
|
||||
drag = type.drag * (isGrounded() ? (floorOn().dragMultiplier) : 1f);
|
||||
drag = type.drag * (isGrounded() ? (floorOn().dragMultiplier) : 1f) * dragMultiplier;
|
||||
|
||||
//apply knockback based on spawns
|
||||
if(team != state.rules.waveTeam && state.hasSpawns() && (!net.client() || isLocal())){
|
||||
|
@ -24,6 +24,8 @@ public class StatusEffect extends UnlockableContent{
|
||||
public float reloadMultiplier = 1f;
|
||||
/** Unit build speed multiplier. */
|
||||
public float buildSpeedMultiplier = 1f;
|
||||
/** Unit drag multiplier. */
|
||||
public float dragMultiplier = 1f;
|
||||
/** Damage dealt upon transition to an affinity. */
|
||||
public float transitionDamage = 0f;
|
||||
/** Unit weapon(s) disabled. */
|
||||
|
Loading…
Reference in New Issue
Block a user