]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/Main.qc
Merge remote branch 'origin/terencehill/newpanelhud-dom_points' into terencehill...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / Main.qc
index 6df7dfa09f360f39a646ed0f87147c46df9840e6..d37a971eaebc7b3dd9ebe71b0ad58f5d2794916c 100644 (file)
@@ -1253,6 +1253,20 @@ void Net_ReadRace()
        }
 }
 
+void Net_ReadDom()
+{
+       if (dom_total_pps == 0)
+               dom_total_pps = ReadShort() / 100.0;
+       dom_pps_red = ReadShort() / 100.0;
+       dom_pps_blue = ReadShort() / 100.0;
+       //if dom_pps_yellow/dom_pps_pink was negative the first time we read it,
+       //it means the relative team doesn't exist and we don't have to read its value anymore
+       if (dom_pps_yellow >= 0)
+               dom_pps_yellow = ReadShort() / 100.0;
+       if (dom_pps_pink >= 0)
+               dom_pps_pink = ReadShort() / 100.0;
+}
+
 void Net_ReadSpawn()
 {
        zoomin_effect = 1;
@@ -1347,6 +1361,10 @@ float CSQC_Parse_TempEntity()
                        Net_ReadRace();
                        bHandled = true;
                        break;
+               case TE_CSQC_DOM:
+                       Net_ReadDom();
+                       bHandled = true;
+                       break;
                case TE_CSQC_SPAWN:
                        Net_ReadSpawn();
                        bHandled = true;