Archived
1
0
Fork 0

fix: change reliable flag to false in BroadcastToPresences function

This commit is contained in:
Sebastian Benjamin 2025-06-03 17:36:30 -07:00 committed by Sebastian Benjamin (aider)
parent 7ee2d7b3b8
commit 75b5ccd2e3
2 changed files with 3 additions and 1 deletions

View file

@ -97,7 +97,7 @@ func BroadcastToPresences(tick int64, lobbyState *MatchState, logger *runtime.Lo
if err != nil {
(*logger).Error("Error marshalling bullet data", err)
} else {
reliable := true
reliable := false
(*dispatcher).BroadcastMessage(STATE_UPDATE, data, nil, nil, reliable)
}
}

View file

@ -4,6 +4,7 @@ import (
"danmaku/ffi"
"math"
"slices"
"time"
)
type PlayerStageState struct {
@ -110,6 +111,7 @@ func (s *PlayerStageState) MakeServerTick(tick int64, serializedNewBullets []map
ForcePlayerPos: s.updatePlayerPos,
DeathTimer: s.deathTimer,
Graze: s.graze,
UTCTime: float64(time.Now().UnixMilli()) / 1000.0,
}
// When this is called, we want to transmit updatePlayerPos if it's true once and then reset