MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / GetServerGameTime

Function GetServerGameTime

Descent3/multi.cpp:4856–4867  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4854 MultiSendRenewPlayer(slot);
4855}
4856void GetServerGameTime() {
4857 MULTI_ASSERT(Netgame.local_role != LR_SERVER, "Server in GetServerGameTime!");
4858 uint8_t outdata[MAX_GAME_DATA_SIZE];
4859 int count = 0;
4860 int size;
4861 mprintf(0, "Requesting gametime from server\n");
4862 Got_new_game_time = 0;
4863 size = START_DATA(MP_GET_GAMETIME, outdata, &count);
4864 MultiAddFloat(timer_GetTime(), outdata, &count);
4865 END_DATA(count, outdata, size);
4866 nw_Send(&Netgame.server_address, outdata, count, 0);
4867}
4868void MultiDoGameTimeReq(uint8_t *data, network_address *from_addr) {
4869 uint8_t outdata[MAX_GAME_DATA_SIZE];
4870 int count = 0;

Callers 1

MultiDoClientFrameFunction · 0.85

Calls 4

START_DATAFunction · 0.85
MultiAddFloatFunction · 0.85
END_DATAFunction · 0.85
nw_SendFunction · 0.85

Tested by

no test coverage detected