]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/net.qh
Merge branch 'martin-t/nottarg' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / net.qh
index b1f5326a9bb5a441b5094de347cfe973086d5bd6..fe2952e2c4025c3d5f84854627824cc3f4ab3d6f 100644 (file)
@@ -304,6 +304,11 @@ MACRO_END
                if (g_buf) strunzone(g_buf);
                g_buf = strzone(tmp);
        }
+       void WriteShort(int to, int b)
+       {
+               WriteByte(to, (b >> 8) & 0xFF);
+               WriteByte(to, b & 0xFF);
+       }
 #elif defined(SVQC)
        int ReadByte()
        {
@@ -311,6 +316,10 @@ MACRO_END
                ydec_single(g_buf, ret);
                return ret;
        }
+       int ReadShort()
+       {
+               return (ReadByte() << 8) | (ReadByte());
+       }
        void WriteByte(int to, int b);
 #endif