Skip to content

Commit

Permalink
Fix force effect
Browse files Browse the repository at this point in the history
Without duration the effect is ceased immediately in the next tick.
  • Loading branch information
steffen-wilke committed Dec 7, 2024
1 parent 5ac7732 commit d4855ea
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public abstract class ForceEffect extends Effect {
* @param targetingStrategy The strategy used to select which entities will be affected by the effect.
* @param strength The strength of the applied force.
*/
protected ForceEffect(final TargetingStrategy targetingStrategy, final float strength) {
this(targetingStrategy, null, strength);
protected ForceEffect(final TargetingStrategy targetingStrategy, final float strength, final int duration) {
this(targetingStrategy, null, strength, duration);
}

/**
Expand All @@ -39,8 +39,8 @@ protected ForceEffect(final TargetingStrategy targetingStrategy, final float str
* @param executingEntity The entity executing the effect (e.g., a player or NPC).
* @param strength The strength of the applied force.
*/
protected ForceEffect(final TargetingStrategy targetingStrategy, final ICombatEntity executingEntity, final float strength) {
super(targetingStrategy, executingEntity);
protected ForceEffect(final TargetingStrategy targetingStrategy, final ICombatEntity executingEntity, final float strength, final int duration) {
super(targetingStrategy, executingEntity, duration);
this.strength = strength;
this.appliedForces = new ConcurrentHashMap<>();
}
Expand Down

0 comments on commit d4855ea

Please sign in to comment.