fix projectile colliders in movement

This commit is contained in:
2025-01-19 20:55:16 +09:00
parent 072204b902
commit e4f1fe19f4
6 changed files with 30 additions and 21 deletions
+5 -1
View File
@@ -98,6 +98,10 @@ export default class Game {
this.currentTick++
}
visionByTeam() {
return null // TODO: vision
}
#calculateTickMetrics() {
this.averageTick = Math.floor(10 * this.#timings.reduce((sum, t) => sum += t, 0) / this.#timings.length) / 10
this.secondToSlowestTick = Math.floor(10 * this.#timings.toSorted().at(-2)) / 10
@@ -126,7 +130,7 @@ export default class Game {
}
if (after - before > tickBudget) {
console.warn(`Can't keep up! A tick took ${taken.toFixed(1)} ms / ${tickBudget} ms. (Behind ${this.#behindMs} ms)`)
console.warn(`Can't keep up! A tick took ${taken.toFixed(1)} ms / ${tickBudget.toFixed(1)} ms. (Behind ${this.#behindMs.toFixed(1)} ms)`)
}
}
}