MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / new_client

Method new_client

ogsr_engine/xrGame/xrServer_Connect.cpp:48–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48IClient* xrServer::new_client(SClientConnectData* cl_data)
49{
50 IClient* CL = client_Find_Get(cl_data->clientID);
51 VERIFY(CL);
52
53 // copy entity
54 CL->ID = cl_data->clientID;
55 CL->process_id = cl_data->process_id;
56
57 string64 new_name;
58 strcpy_s(new_name, cl_data->name);
59 CL->name = new_name;
60 CL->pass = cl_data->pass;
61
62 NET_Packet P;
63 P.B.count = 0;
64 P.r_pos = 0;
65
66 game->AddDelayedEvent(P, GAME_EVENT_CREATE_CLIENT, 0, CL->ID);
67 if (client_Count() == 1)
68 {
69 Update();
70 }
71 return CL;
72}
73
74void xrServer::AttachNewClient(IClient* CL)
75{

Callers

nothing calls this directly

Calls 3

client_CountFunction · 0.85
UpdateFunction · 0.85
AddDelayedEventMethod · 0.80

Tested by

no test coverage detected