MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / addClient

Method addClient

source/game/StarSystemWorldServerThread.cpp:28–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28void SystemWorldServerThread::addClient(ConnectionId clientId, Uuid const& uuid, float shipSpeed, SystemLocation const& location) {
29 WriteLocker locker(m_mutex);
30 m_clients.add(clientId);
31 m_outgoingPacketQueue.set(clientId, List<PacketPtr>());
32
33 m_systemWorld->addClientShip(clientId, uuid, shipSpeed, location);
34
35 m_clientShipLocations.set(clientId, {m_systemWorld->clientShipLocation(clientId), m_systemWorld->clientSkyParameters(clientId)});
36 if (auto warpAction = m_systemWorld->clientWarpAction(clientId))
37 m_clientWarpActions.set(clientId, *warpAction);
38}
39
40void SystemWorldServerThread::removeClient(ConnectionId clientId) {
41 WriteLocker locker(m_mutex);

Callers

nothing calls this directly

Calls 6

addClientShipMethod · 0.80
addMethod · 0.45
setMethod · 0.45
clientShipLocationMethod · 0.45
clientSkyParametersMethod · 0.45
clientWarpActionMethod · 0.45

Tested by

no test coverage detected