Skip to content

Commit

Permalink
Update build button state 3 times per second (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlange-42 authored Mar 17, 2024
1 parent cfe4303 commit 5c2afbb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion game/sys/update_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ func (s *UpdateStats) Update(world *ecs.World) {
randomTerrains.TotalAvailable-randomTerrains.TotalPlaced,
randomTerrains.TotalAvailable))

if tick%interval != 0 {
// Do the rest only 3x per second
if tick%(interval/3) != 0 {
return
}

Expand Down

0 comments on commit 5c2afbb

Please sign in to comment.