From c1fb3bcef0be719588147dbc9a3554629e8b2b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Untersch=C3=BCtz?= Date: Wed, 22 Apr 2026 20:09:53 +0200 Subject: [PATCH] add player state tracking: introduce `State` field to room struct, include state in player updates --- pkg/server/room.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/server/room.go b/pkg/server/room.go index 14d482d..c0a02ab 100644 --- a/pkg/server/room.go +++ b/pkg/server/room.go @@ -30,6 +30,7 @@ type ServerPlayer struct { BonusScore int // Score aus Coins und anderen Boni IsAlive bool IsSpectator bool + State string // Aktueller State (z.B. Emote) // Powerups HasDoubleJump bool // Doppelsprung aktiv? @@ -913,6 +914,7 @@ func (r *Room) Broadcast() { Y: p.Y, VX: p.VX, VY: p.VY, + State: p.State, OnGround: p.OnGround, OnWall: p.OnWall, LastInputSeq: p.LastInputSeq,