diff --git a/core/src/mindustry/entities/pattern/ShootMulti.java b/core/src/mindustry/entities/pattern/ShootMulti.java index 10fe77ac3e..f54ccdcd81 100644 --- a/core/src/mindustry/entities/pattern/ShootMulti.java +++ b/core/src/mindustry/entities/pattern/ShootMulti.java @@ -35,7 +35,7 @@ public class ShootMulti extends ShootPattern{ if(move != null) move.move(b); if(mover != null) mover.move(b); }); - }); + }, null); } }, barrelIncrementer); } diff --git a/core/src/mindustry/entities/pattern/ShootPattern.java b/core/src/mindustry/entities/pattern/ShootPattern.java index 2738eb5656..4cb15187df 100644 --- a/core/src/mindustry/entities/pattern/ShootPattern.java +++ b/core/src/mindustry/entities/pattern/ShootPattern.java @@ -14,14 +14,15 @@ public class ShootPattern implements Cloneable{ /** Called on a single "trigger pull". This function should call the handler with any bullets that result. */ public void shoot(int totalShots, BulletHandler handler, @Nullable Runnable barrelIncrementer){ - for(int i = 0; i < shots; i++){ - handler.shoot(0, 0, 0, firstShotDelay + shotDelay * i); - } + //the default implementation calls the "soft deprecated" variant for mod compatibility, so overrides from older mods can function properly + shoot(totalShots, handler); } /** Called on a single "trigger pull". This function should call the handler with any bullets that result. */ public void shoot(int totalShots, BulletHandler handler){ - shoot(totalShots, handler, null); + for(int i = 0; i < shots; i++){ + handler.shoot(0, 0, 0, firstShotDelay + shotDelay * i); + } } /** Subclasses should override this to flip its sides. */