From: Rudolf Polzer Date: Mon, 6 Jun 2011 19:09:53 +0000 (+0200) Subject: don't send a vote string when no vote is active X-Git-Tag: xonotic-v0.5.0~211^2~15 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=072d947804c6e95f4870825df875ca961ff1d6ff;p=xonotic%2Fxonotic-data.pk3dir.git don't send a vote string when no vote is active --- diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 0cc156391..c9fbc87b1 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -848,6 +848,13 @@ void Ent_Nagger() nags = ReadByte(); + if(!(nags & 4)) + { + if(vote_called_vote) + strunzone(vote_called_vote); + vote_called_vote = string_null; + } + if(nags & 128) { if(vote_called_vote) diff --git a/qcsrc/server/clientcommands.qc b/qcsrc/server/clientcommands.qc index 40e0fcd46..f61fecf50 100644 --- a/qcsrc/server/clientcommands.qc +++ b/qcsrc/server/clientcommands.qc @@ -25,6 +25,9 @@ float Nagger_SendEntity(entity to, float sendflags) if(sendflags & 128) nags |= 128; + if(!(nags & 4)) // no vote called? send no string + nags &~= 128; + WriteByte(MSG_ENTITY, nags); if(nags & 128) diff --git a/qcsrc/server/vote.qc b/qcsrc/server/vote.qc index fbc8032bb..bad3eafe4 100644 --- a/qcsrc/server/vote.qc +++ b/qcsrc/server/vote.qc @@ -478,6 +478,8 @@ void VoteReset() { votecalled = FALSE; votecalledmaster = FALSE; votefinished = 0; + votecalledvote = string_null; + votecalledvote_display = string_null; } void VoteAccept() {