MCPcopy Create free account
hub / github.com/assaultcube/AC / sendworldstate

Function sendworldstate

source/src/server.cpp:4396–4406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4394}
4395
4396void sendworldstate()
4397{
4398 static enet_uint32 lastsend = 0;
4399 if(clients.empty()) return;
4400 enet_uint32 curtime = enet_time_get()-lastsend;
4401 if(curtime<40) return;
4402 bool flush = buildworldstate();
4403 lastsend += curtime - (curtime%40);
4404 if(flush) enet_host_flush(serverhost);
4405 if(demorecord) sg->recordpackets = true; // enable after 'old' worldstate is sent
4406}
4407
4408void loggamestatus(const char *reason)
4409{

Callers 1

serversliceFunction · 0.85

Calls 4

buildworldstateFunction · 0.85
enet_host_flushFunction · 0.85
enet_time_getFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected