mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
Handle interval == 0 windups
This commit is contained in:
parent
53cd13b0ec
commit
0a3d559b39
@ -153,8 +153,12 @@ public abstract class Windup extends Deactivatable {
|
||||
|
||||
@Override
|
||||
public void activate() {
|
||||
active = true;
|
||||
startTask();
|
||||
if (interval <= 0) {
|
||||
runnable.run();
|
||||
} else {
|
||||
active = true;
|
||||
startTask();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -163,7 +167,9 @@ public abstract class Windup extends Deactivatable {
|
||||
@Override
|
||||
public void deactivate() {
|
||||
active = false;
|
||||
getTask().cancel();
|
||||
if (getTask() != null) {
|
||||
getTask().cancel();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -102,14 +102,4 @@ public class DropSign extends Windup {
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void activate() {
|
||||
if (interval < 0) {
|
||||
active = true;
|
||||
getRunnable().run();
|
||||
} else {
|
||||
super.activate();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user