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

Method SendRealGametime

netgames/dmfc/dmfcpackets.cpp:419–436  ·  view source on GitHub ↗

DMFCBase::SendRealGametime Updates a player about the 'real' game time

Source from the content-addressed store, hash-verified

417//
418// Updates a player about the 'real' game time
419void DMFCBase::SendRealGametime(int pnum) {
420 int count = 0;
421 uint8_t data[MAX_GAME_DATA_SIZE];
422
423 StartPacket(data, SPID_REALGAMETIME, &count);
424
425 MultiAddFloat(RealGametime, data, &count);
426
427 if (m_iProtectedFlags & DMFC_PRF_PAUSETIME) {
428 // time is paused
429 MultiAddByte(1, data, &count);
430 } else {
431 // time is not paused
432 MultiAddByte(0, data, &count);
433 }
434
435 SendPacket(data, count, pnum);
436}
437
438// DMFCBase::GetRealGametime
439//

Callers

nothing calls this directly

Calls 2

MultiAddFloatFunction · 0.85
MultiAddByteFunction · 0.85

Tested by

no test coverage detected