mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-02-07 15:12:35 +01:00
Make game timers end the game at 00:00
This commit is contained in:
parent
9ee11df10f
commit
2cb33a5ec6
@ -153,16 +153,20 @@ public class InteractionGameTimer extends HabboItem implements Runnable {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.timeNow--;
|
||||||
|
if (this.timeNow < 0) this.timeNow = 0;
|
||||||
|
|
||||||
if (this.timeNow > 0) {
|
if (this.timeNow > 0) {
|
||||||
this.threadActive = true;
|
this.threadActive = true;
|
||||||
Emulator.getThreading().run(this, 1000);
|
Emulator.getThreading().run(this, 1000);
|
||||||
this.timeNow--;
|
|
||||||
room.updateItem(this);
|
|
||||||
} else {
|
} else {
|
||||||
this.threadActive = false;
|
this.threadActive = false;
|
||||||
|
this.timeNow = 0;
|
||||||
this.endGame(room);
|
this.endGame(room);
|
||||||
WiredHandler.handle(WiredTriggerType.GAME_ENDS, null, room, new Object[]{});
|
WiredHandler.handle(WiredTriggerType.GAME_ENDS, null, room, new Object[]{});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
room.updateItem(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user