aboutsummaryrefslogtreecommitdiff
path: root/internal/game/act.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/act.go')
-rw-r--r--internal/game/act.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/game/act.go b/internal/game/act.go
index 64d1848..1317df4 100644
--- a/internal/game/act.go
+++ b/internal/game/act.go
@@ -198,7 +198,10 @@ func (g *Game) AdvanceActions() {
if g.Hub == nil {
return
}
- for _, sess := range g.Hub.AllSessions() {
+ // One session snapshot per tick: the background-action pass below used to
+ // re-snapshot the whole hub.
+ sessions := g.Hub.AllSessions()
+ for _, sess := range sessions {
p := sess.Player
if p == nil || p.Action == nil {
continue
@@ -245,7 +248,7 @@ func (g *Game) AdvanceActions() {
}
}
- for _, sess := range g.Hub.AllSessions() {
+ for _, sess := range sessions {
p := sess.Player
if p == nil || p.BackgroundAction == nil {
continue