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

+2
View File
@@ -84,6 +84,7 @@ func (g *Gateway) Listen() error {
if n == 20 {
if err := g.processNetOperation(append([]byte(nil), buf[:n]...), addr); err != nil {
PacketLog("[ERROR] netop: " + err.Error())
Log("[KCP] handshake rejected: " + err.Error())
}
} else if n >= 28 {
g.processKCPPayload(append([]byte(nil), buf[:n]...), addr)
@@ -208,6 +209,7 @@ func (g *Gateway) processKCPPayload(data []byte, addr *net.UDPAddr) {
// same-conv replays from a stale client get rejected by the token check
if err := session.Consume(data); err != nil {
PacketLog("[ERROR] Session consume error (" + addr.String() + "): " + err.Error())
Log("[KCP] packet rejected: " + err.Error())
}
}