send speed award as long int instead to make it harder to get a "negative speed" :P
authorfruitiex <fruitiex@f962a42d-fe04-0410-a3ab-8c8b0445ebaa>
Sat, 6 Feb 2010 17:59:53 +0000 (17:59 +0000)
committerfruitiex <fruitiex@f962a42d-fe04-0410-a3ab-8c8b0445ebaa>
Sat, 6 Feb 2010 17:59:53 +0000 (17:59 +0000)
git-svn-id: svn://svn.icculus.org/nexuiz/trunk@8617 f962a42d-fe04-0410-a3ab-8c8b0445ebaa

data/qcsrc/client/Main.qc
data/qcsrc/server/cl_physics.qc

index 6f358f5..5786fc5 100644 (file)
@@ -1094,7 +1094,7 @@ void Net_ReadRace()
                        race_server_record = ReadInt24_t();
                        break;
                case RACE_NET_SPEED_AWARD:
-                       race_speedaward = ReadShort();
+                       race_speedaward = ReadInt24_t();
                        if(race_speedaward_holder)
                                strunzone(race_speedaward_holder);
                        race_speedaward_holder = strzone(ReadString());
index 48318f5..8080582 100644 (file)
@@ -567,7 +567,7 @@ void race_send_speedaward(float msg)
        WriteByte(msg, SVC_TEMPENTITY);
        WriteByte(msg, TE_CSQC_RACE);
        WriteByte(msg, RACE_NET_SPEED_AWARD);
-       WriteShort(msg, floor(speedaward_speed+0.5));
+       WriteInt24_t(msg, floor(speedaward_speed+0.5));
        WriteString(msg, speedaward_holder);
 }