MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / SendUserInfoToServer

Method SendUserInfoToServer

neo/framework/async/AsyncClient.cpp:581–602  ·  view source on GitHub ↗

================== idAsyncClient::SendUserInfoToServer ================== */

Source from the content-addressed store, hash-verified

579==================
580*/
581void idAsyncClient::SendUserInfoToServer( void ) {
582 idBitMsg msg;
583 byte msgBuf[MAX_MESSAGE_SIZE];
584 idDict info;
585
586 if ( clientState < CS_CONNECTED ) {
587 return;
588 }
589
590 info = *cvarSystem->MoveCVarsToDict( CVAR_USERINFO );
591
592 // send reliable client info to server
593 msg.Init( msgBuf, sizeof( msgBuf ) );
594 msg.WriteByte( CLIENT_RELIABLE_MESSAGE_CLIENTINFO );
595 msg.WriteDeltaDict( info, &sessLocal.mapSpawnData.userInfo[ clientNum ] );
596
597 if ( !channel.SendReliableMessage( msg ) ) {
598 common->Error( "client->server reliable messages overflow\n" );
599 }
600
601 sessLocal.mapSpawnData.userInfo[clientNum] = info;
602}
603
604/*
605==================

Callers

nothing calls this directly

Calls 6

MoveCVarsToDictMethod · 0.80
WriteDeltaDictMethod · 0.80
InitMethod · 0.45
WriteByteMethod · 0.45
SendReliableMessageMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected