fix: improve endgame clock and gameplay stability

This commit is contained in:
CAtlas0784 committed 2026-11-04 15:59:48 +07:00
1 parent ce6aabfc55
commit 658298ee86
46 files changed
+1915 -99

No files matched your search

+4
View File
@@ -213,6 +213,10 @@ func (k *KCP) State() int32 { return k.state }
// IsDeadLink reports whether resends exceeded the dead link limit.
func (k *KCP) IsDeadLink() bool { return k.state != 0 }
// PendingSends reports segments waiting to be transmitted or acknowledged.
// Callers must serialize access with other KCP operations.
func (k *KCP) PendingSends() int { return len(k.sndQueue) + len(k.sndBuf) }
func (k *KCP) moveBuf() {
for len(k.rcvBuf) > 0 {
seg := &k.rcvBuf[0]