Skip to content

Commit 6209a99

Browse files
committed
fix countLag calculation
1 parent 1f2c565 commit 6209a99

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/gameServer/server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ func (g *GameServer) ManageBuffer() {
141141
// if leadPlayer == 0 {
142142
// if g.gameData.averageBufferHealth[i] > bufferHealth {
143143
if g.gameData.averageCountLag[i] < countLag {
144+
countLag = g.gameData.averageCountLag[i]
144145
bufferHealth = g.gameData.averageBufferHealth[i]
145146
leadPlayer = i + 1
146147
}

0 commit comments

Comments
 (0)