mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 10:20:16 +01:00
Corrections zones
This commit is contained in:
@@ -183,9 +183,12 @@ export default {
|
||||
|
||||
goNextZone() {
|
||||
this.currentZone.id++;
|
||||
if (this.currentZone.id >= this.zones.length) return;
|
||||
this.currentZone.timeoutId = setTimeout(() => this.goNextZone(), this.getCurrentZone().duration * 60 * 1000);
|
||||
this.currentZone.endDate = Date.now() + this.getCurrentZone().duration * 60 * 1000;
|
||||
if (this.currentZone.id >= this.zones.length - 1) {
|
||||
this.currentZone.endDate = Date.now();
|
||||
} else {
|
||||
this.currentZone.timeoutId = setTimeout(() => this.goNextZone(), this.getCurrentZone().duration * 60 * 1000);
|
||||
this.currentZone.endDate = Date.now() + this.getCurrentZone().duration * 60 * 1000;
|
||||
}
|
||||
this.zoneBroadcast();
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user