]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
don't send a vote string when no vote is active
authorRudolf Polzer <divverent@xonotic.org>
Mon, 6 Jun 2011 19:09:53 +0000 (21:09 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Mon, 6 Jun 2011 19:09:53 +0000 (21:09 +0200)
qcsrc/client/Main.qc
qcsrc/server/clientcommands.qc
qcsrc/server/vote.qc

index 0cc1563916a035793579d15b412c98f10af3e3df..c9fbc87b1b07ba0db18266125cd252f9155188f6 100644 (file)
@@ -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)
index 40e0fcd469723d9bcae56b594a7cb8b3c6ca863f..f61fecf50754996d656e51c65234380598ea42c2 100644 (file)
@@ -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)
index fbc8032bb1cd6fa3f846d9b37a7c5c84916cd719..bad3eafe40d3c78b5b1d2d6438c08537d7469e76 100644 (file)
@@ -478,6 +478,8 @@ void VoteReset() {
        votecalled = FALSE;
        votecalledmaster = FALSE;
        votefinished = 0;
+       votecalledvote = string_null;
+       votecalledvote_display = string_null;
 }
 
 void VoteAccept() {