- WriteByte(MSG_ALL, SVC_TEMPENTITY);
- WriteByte(MSG_ALL, TE_CSQC_DOM);
- WriteShort(MSG_ALL, dom_pps_red * 100.0);
- WriteShort(MSG_ALL, dom_pps_blue * 100.0);
- if (c3 >= 0) WriteShort(MSG_ALL, dom_pps_yellow * 100.0);
- if (c4 >= 0) WriteShort(MSG_ALL, dom_pps_pink * 100.0);
-}
-//Must be called ONLY when a client connects to send total pps and state
-//If yellow/pink team doesn't exist sends a negative dom_pps_yellow/dom_pps_pink
-//to let know the client to not read these values anymore
-void send_CSQC_dom_all()
-{
- WriteByte(MSG_ALL, SVC_TEMPENTITY);
- WriteByte(MSG_ALL, TE_CSQC_DOM);
- WriteShort(MSG_ALL, dom_total_pps * 100.0);
- WriteShort(MSG_ALL, dom_pps_red * 100.0);
- WriteShort(MSG_ALL, dom_pps_blue * 100.0);
- WriteShort(MSG_ALL, dom_pps_yellow * 100.0);
- WriteShort(MSG_ALL, dom_pps_pink * 100.0);
+ e.dom_total_pps = total_pps;
+ e.dom_pps_red = pps_red;
+ e.dom_pps_blue = pps_blue;
+ if(c3 >= 0)
+ e.dom_pps_yellow = pps_yellow;
+ if(c4 >= 0)
+ e.dom_pps_pink = pps_pink;