| 1814 | |
| 1815 | |
| 1816 | void Net_CheckLastReceived (int counts) |
| 1817 | { |
| 1818 | #if 0 |
| 1819 | // [Ed850] Check to see the last time a packet was received. |
| 1820 | // If it's longer then 3 seconds, a node has likely stalled. |
| 1821 | if (I_GetTime() - lastglobalrecvtime >= GameTicRate * 3) |
| 1822 | { |
| 1823 | lastglobalrecvtime = I_GetTime(); //Bump the count |
| 1824 | |
| 1825 | if (NetMode == NET_PeerToPeer || myconnectindex == Net_Arbitrator) |
| 1826 | { |
| 1827 | //Keep the local node in the for loop so we can still log any cases where the local node is /somehow/ late. |
| 1828 | //However, we don't send a resend request for sanity reasons. |
| 1829 | for (int i = 0; i < doomcom.numnodes; i++) |
| 1830 | { |
| 1831 | if (nodeingame[i] && nettics[i] <= gametic + counts) |
| 1832 | { |
| 1833 | # |
| 1834 | if (debugfile && !players[playerfornode[i]].waiting) |
| 1835 | fprintf(debugfile, "%i is slow (%i to %i)\n", |
| 1836 | i, nettics[i], gametic + counts); |
| 1837 | //Send resend request to the late node. Also mark the node as waiting to display it in the hud. |
| 1838 | if (i != 0) |
| 1839 | remoteresend[i] = players[playerfornode[i]].waiting = hadlate = true; |
| 1840 | } |
| 1841 | else |
| 1842 | players[playerfornode[i]].waiting = false; |
| 1843 | } |
| 1844 | } |
| 1845 | else |
| 1846 | { //Send a resend request to the Arbitrator, as it's obvious we are stuck here. |
| 1847 | if (debugfile && !players[Net_Arbitrator].waiting) |
| 1848 | fprintf(debugfile, "Arbitrator is slow (%i to %i)\n", |
| 1849 | nettics[nodeforplayer[Net_Arbitrator]], gametic + counts); |
| 1850 | //Send resend request to the Arbitrator. Also mark the Arbitrator as waiting to display it in the hud. |
| 1851 | remoteresend[nodeforplayer[Net_Arbitrator]] = players[Net_Arbitrator].waiting = hadlate = true; |
| 1852 | } |
| 1853 | } |
| 1854 | #endif |
| 1855 | } |
| 1856 | |
| 1857 | void Net_NewMakeTic (void) |
| 1858 | { |
no test coverage detected