fix: render spawn highlight on 1/5 frames instead of 4/5 (#3782)

Resolves #3590

## Description:
The spawnHighlight() function in TerritoryLayer.ts was using `=== 0` 
as the condition to return early, which caused the spawn highlight to 
render on 4 out of every 5 frames instead of the intended 1 out of 5. 
Changed `=== 0` to `!== 0` so the function skips rendering on 4/5 
frames, improving performance especially on large maps.


## Please complete the following:

- [ ] I have added screenshots for all UI updates
- [ ] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [ ] I have added relevant tests to the test directory
- [x ] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
This commit is contained in:
Giovanni
2026-04-27 15:49:08 +01:00
committed by GitHub
parent 408d0e4862
commit 4aeece4aef
+1 -1
View File
@@ -167,7 +167,7 @@ export class TerritoryLayer implements Layer {
}
private spawnHighlight() {
if (this.game.ticks() % 5 === 0) {
if (this.game.ticks() % 5 !== 0) {
return;
}