aboutsummaryrefslogtreecommitdiff
path: root/client_conn.go
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2023-12-06 18:23:58 +0100
committerHimbeerserverDE <himbeerserverde@gmail.com>2023-12-06 18:23:58 +0100
commit67dd8da1e976fee071b66268aaaecc415b805995 (patch)
treef8ee79b24d448f7b14eb34ac676e03387714c7a9 /client_conn.go
parentfe8fa21ac67b3e9e458e3ae964745338e6323a50 (diff)
hopping: don't reset the client if it hasn't received initialization yet
Diffstat (limited to 'client_conn.go')
-rw-r--r--client_conn.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/client_conn.go b/client_conn.go
index 760c6b7..4a073f6 100644
--- a/client_conn.go
+++ b/client_conn.go
@@ -67,6 +67,8 @@ type ClientConn struct {
// Name returns the player name of the ClientConn.
func (cc *ClientConn) Name() string { return cc.name }
+func (cc *ClientConn) hasPlayerCAO() bool { return cc.playerCAO == 0 }
+
func (cc *ClientConn) server() *ServerConn {
cc.mu.RLock()
defer cc.mu.RUnlock()