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

Function StartTrackerGame

netcon/mtclient/mtgametrack.cpp:370–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370void StartTrackerGame(void *buffer) {
371
372 struct tm *newtime;
373 time_t aclock;
374 time(&aclock); /* Get time in seconds */
375 newtime = localtime(&aclock);
376 // Time to update the tracker again
377 DLLmprintf(0, "[%.24s] Updating the PXO game tracker with a new game!\n", asctime(newtime));
378
379 if (GameType == GT_FREESPACE) {
380 // memcpy(FreeSpaceTrackerGameData,buffer,sizeof(freespace_net_game_data));
381 } else if (GameType == GT_DESCENT3) {
382 memcpy(D3TrackerGameData, buffer, sizeof(d3_net_game_data_short));
383 SendGameTrackerPacker(&TrackerGameData);
384 TrackerAckdUs = 0;
385 LastTrackerUpdate = DLLtimer_GetTime();
386 LastSentToTracker = DLLtimer_GetTime();
387
388 } else if (GameType == GT_D3TNG) {
389 memcpy(D3TrackerGameData, buffer, sizeof(d3_net_game_data_tiny));
390 SendGameTrackerPacker(&TrackerGameData);
391 TrackerAckdUs = 0;
392 LastTrackerUpdate = DLLtimer_GetTime();
393 LastSentToTracker = DLLtimer_GetTime();
394 }
395 TrackerGameIsRunning = 1;
396 // LastTrackerUpdate = 0;
397}

Callers 1

DLLFUNCCALL DLLMultiCallFunction · 0.85

Calls 1

SendGameTrackerPackerFunction · 0.85

Tested by

no test coverage detected