================= CL_ReadyToSendPacket Returns qfalse if we are over the maxpackets limit and should choke back the bandwidth a bit by not sending a packet this frame. All the commands will still get delivered in the next packet, but saving a header and getting more delta compression will reduce total bandwidth. ================= */
| 771 | ================= |
| 772 | */ |
| 773 | qboolean CL_ReadyToSendPacket( void ) { |
| 774 | // don't send anything if playing back a demo |
| 775 | // if ( cls.state == CA_CINEMATIC ) |
| 776 | if ( cls.state == CA_CINEMATIC || CL_IsRunningInGameCinematic()) |
| 777 | { |
| 778 | return qfalse; |
| 779 | } |
| 780 | |
| 781 | // if we don't have a valid gamestate yet, only send |
| 782 | // one packet a second |
| 783 | if ( cls.state != CA_ACTIVE && cls.state != CA_PRIMED |
| 784 | && cls.realtime - clc.lastPacketSentTime < 1000 ) { |
| 785 | return qfalse; |
| 786 | } |
| 787 | |
| 788 | // send every frame for loopbacks |
| 789 | return qtrue; |
| 790 | } |
| 791 | |
| 792 | /* |
| 793 | =================== |
no test coverage detected