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
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 1m52s
This commit is contained in:
@@ -30,6 +30,7 @@ type ServerPlayer struct {
|
|||||||
BonusScore int // Score aus Coins und anderen Boni
|
BonusScore int // Score aus Coins und anderen Boni
|
||||||
IsAlive bool
|
IsAlive bool
|
||||||
IsSpectator bool
|
IsSpectator bool
|
||||||
|
State string // Aktueller State (z.B. Emote)
|
||||||
|
|
||||||
// Powerups
|
// Powerups
|
||||||
HasDoubleJump bool // Doppelsprung aktiv?
|
HasDoubleJump bool // Doppelsprung aktiv?
|
||||||
@@ -913,6 +914,7 @@ func (r *Room) Broadcast() {
|
|||||||
Y: p.Y,
|
Y: p.Y,
|
||||||
VX: p.VX,
|
VX: p.VX,
|
||||||
VY: p.VY,
|
VY: p.VY,
|
||||||
|
State: p.State,
|
||||||
OnGround: p.OnGround,
|
OnGround: p.OnGround,
|
||||||
OnWall: p.OnWall,
|
OnWall: p.OnWall,
|
||||||
LastInputSeq: p.LastInputSeq,
|
LastInputSeq: p.LastInputSeq,
|
||||||
|
|||||||
Reference in New Issue
Block a user