MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / finishDestroyPlayer

Method finishDestroyPlayer

engine/Poseidon/Network/NetTransportNet.cpp:2088–2123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2086 {
2087 nMsg = nBytes = nMsgG = nBytesG = 0;
2088 }
2089 leaveUsr();
2090}
2091
2092bool NetServer::GetConnectionInfo(int to, int& latencyMS, int& throughputBPS)
2093{
2094 enterUsr();
2095 RefD<NetChannel> channel;
2096 if (!users.get(to, channel))
2097 {
2098 leaveUsr();
2099 return false;
2100 }
2101 latencyMS = (int)(channel->getLatency() / 1000);
2102 throughputBPS = (int)channel->getOutputBandWidth();
2103#ifdef NET_LOG_INFO
2104 if (latencyMS != oldLatency || throughputBPS != oldThroughput)
2105 {
2106 NetLog("Channel(%u): NetServer::GetConnectionInfo(player=%d): %d ms,%d B/s", channel->getChannelId(), to,
2107 latencyMS, throughputBPS);
2108 oldLatency = latencyMS;
2109 oldThroughput = throughputBPS;
2110 }
2111#endif
2112 // check the channel condition:
2113 bool dropped = (to != botId) && channel->dropped();
2114 if (dropped)
2115 {
2116 finishDestroyPlayer(to);
2117 }
2118#ifdef DEDICATED_STAT_LOG
2119 if (IsDedicatedServer())
2120 {
2121 unsigned64 now = getSystemTime();
2122#ifdef NET_LOG_TRANSP_STAT
2123 if (true)
2124 {
2125 const bool doConsole = (now >= nextConsoleLog);
2126#else

Callers 3

serverReceiveFunction · 0.80
ctrlReceiveFunction · 0.80
destroyPlayerCallbackFunction · 0.80

Calls 11

sockaddrKeyFunction · 0.85
getPoolFunction · 0.85
checkIntegrityMethod · 0.80
getDistantAddressMethod · 0.80
deleteChannelMethod · 0.80
getMethod · 0.45
removeMethod · 0.45
SizeMethod · 0.45
DeleteMethod · 0.45
AddMethod · 0.45
cardMethod · 0.45

Tested by

no test coverage detected