send bytes instead of shorts in the vote dialog.
authorFruitieX <rasse@rasse-lappy.localdomain>
Wed, 7 Jul 2010 17:17:06 +0000 (20:17 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Wed, 7 Jul 2010 17:17:06 +0000 (20:17 +0300)
qcsrc/client/Main.qc
qcsrc/server/vote.qc

index 7d218cb6540ee0621e99aae09e8fe2371d61571c..de5aad9d48311eaa69f1f2ea7f330063fd0291c5 100644 (file)
@@ -1224,13 +1224,13 @@ void Net_ReadPingPLReport()
 
 void Net_VoteDialog(float highlight) {
        if(highlight) {
-               vote_highlighted = ReadShort();
+               vote_highlighted = ReadByte();
                return;
        }
 
-       vote_yescount = ReadShort();
-       vote_nocount = ReadShort();
-       vote_needed = ReadShort();
+       vote_yescount = ReadByte();
+       vote_nocount = ReadByte();
+       vote_needed = ReadByte();
        vote_active = 1;
 }
 
index 338d98476b38b2a685cfd71ce2b396d827e204b5..e67b5378073820b7815b4c428d000aec986b0237 100644 (file)
@@ -120,7 +120,7 @@ void VoteDialog_UpdateHighlight(float selected) {
        WriteByte(MSG_ONE, SVC_TEMPENTITY);
        WriteByte(MSG_ONE, TE_CSQC_VOTE);
        WriteByte(MSG_ONE, 1);
-       WriteShort(MSG_ONE, selected);
+       WriteByte(MSG_ONE, selected);
 }
 
 void VoteDialog_Reset() {
@@ -545,9 +545,9 @@ void VoteDialog_Update(float msg, float vyes, float vno, float needed) {
        WriteByte(msg, SVC_TEMPENTITY);
        WriteByte(msg, TE_CSQC_VOTE);
        WriteByte(msg, 0);
-       WriteShort(msg, vyes);
-       WriteShort(msg, vno);
-       WriteShort(msg, needed);
+       WriteByte(msg, vyes);
+       WriteByte(msg, vno);
+       WriteByte(msg, needed);
 }
 
 void VoteCount() {