Make game timers end the game at 00:00

This commit is contained in:
Alejandro 2020-02-04 20:52:17 +02:00
parent 9ee11df10f
commit 2cb33a5ec6

View File

@ -153,16 +153,20 @@ public class InteractionGameTimer extends HabboItem implements Runnable {
return;
}
this.timeNow--;
if (this.timeNow < 0) this.timeNow = 0;
if (this.timeNow > 0) {
this.threadActive = true;
Emulator.getThreading().run(this, 1000);
this.timeNow--;
room.updateItem(this);
} else {
this.threadActive = false;
this.timeNow = 0;
this.endGame(room);
WiredHandler.handle(WiredTriggerType.GAME_ENDS, null, room, new Object[]{});
}
room.updateItem(this);
}
@Override