From: Mario Date: Wed, 13 Sep 2017 02:42:57 +0000 (+1000) Subject: Update ready and vote counts when a player becomes an observer X-Git-Tag: xonotic-v0.8.5~2475 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f590d6c5b9082b17e92e2f6305cf410905b595f5;p=xonotic%2Fxonotic-data.pk3dir.git Update ready and vote counts when a player becomes an observer --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 6a978c6ae..52a376b0a 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -219,9 +219,20 @@ void PutObserverInServer(entity this) bool mutator_returnvalue = MUTATOR_CALLHOOK(MakePlayerObserver, this); PlayerState_detach(this); - if (IS_PLAYER(this) && this.health >= 1) { - // despawn effect - Send_Effect(EFFECT_SPAWN_NEUTRAL, this.origin, '0 0 0', 1); + if (IS_PLAYER(this)) + { + if(this.health >= 1) + { + // despawn effect + Send_Effect(EFFECT_SPAWN_NEUTRAL, this.origin, '0 0 0', 1); + } + + // was a player, recount votes and ready status + if(IS_REAL_CLIENT(this)) + { + VoteCount(false); + ReadyCount(); + } } {