Private
Public Access
1
0

add player state tracking: introduce State field to room struct, include state in player updates
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 1m52s

This commit is contained in:
Sebastian Unterschütz
2026-04-22 20:09:53 +02:00
parent e71fd6f0ee
commit c1fb3bcef0

View File

@@ -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,