Fixed #10568
This commit is contained in:
@@ -62,6 +62,7 @@ abstract class StatusComp implements Posc{
|
|||||||
//otherwise, no opposites found, add direct effect
|
//otherwise, no opposites found, add direct effect
|
||||||
StatusEntry entry = Pools.obtain(StatusEntry.class, StatusEntry::new);
|
StatusEntry entry = Pools.obtain(StatusEntry.class, StatusEntry::new);
|
||||||
entry.set(effect, duration);
|
entry.set(effect, duration);
|
||||||
|
applied.set(effect.id);
|
||||||
statuses.add(entry);
|
statuses.add(entry);
|
||||||
effect.applied(self(), duration, false);
|
effect.applied(self(), duration, false);
|
||||||
}
|
}
|
||||||
@@ -127,6 +128,7 @@ abstract class StatusComp implements Posc{
|
|||||||
StatusEntry entry = Pools.obtain(StatusEntry.class, StatusEntry::new);
|
StatusEntry entry = Pools.obtain(StatusEntry.class, StatusEntry::new);
|
||||||
entry.set(StatusEffects.dynamic, Float.POSITIVE_INFINITY);
|
entry.set(StatusEffects.dynamic, Float.POSITIVE_INFINITY);
|
||||||
statuses.add(entry);
|
statuses.add(entry);
|
||||||
|
applied.set(StatusEffects.dynamic.id);
|
||||||
entry.effect.applied(self(), entry.time, false);
|
entry.effect.applied(self(), entry.time, false);
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
case flag -> flag = value;
|
case flag -> flag = value;
|
||||||
case speed -> statusSpeed(Math.max((float)value, 0f));
|
case speed -> statusSpeed(Mathf.clamp((float)value, 0f, 1000f));
|
||||||
case armor -> statusArmor(Math.max((float)value, 0f));
|
case armor -> statusArmor(Math.max((float)value, 0f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user