MCPcopy Create free account
hub / github.com/tobspr-games/shapez.io / decreaseTickRate

Method decreaseTickRate

src/js/game/dynamic_tickrate.js:78–85  ·  view source on GitHub ↗

* Decreases the tick rate marginally

()

Source from the content-addressed store, hash-verified

76 * Decreases the tick rate marginally
77 */
78 decreaseTickRate() {
79 if (G_IS_DEV && globalConfig.debug.renderForTrailer) {
80 return;
81 }
82
83 const desiredFps = this.root.app.settings.getDesiredFps();
84 this.setTickRate(Math.round(Math.max(desiredFps / 2, this.currentTickRate * 0.8)));
85 }
86
87 /**
88 * Call whenever a tick began

Callers

nothing calls this directly

Calls 4

setTickRateMethod · 0.95
getDesiredFpsMethod · 0.80
roundMethod · 0.80
maxMethod · 0.80

Tested by

no test coverage detected