Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void GameEconomicServer::NewConnection(StringHash eventType, Urho3D::VariantMap& eventData)
- {
- /// Get Connection
- Urho3D::Connection * newConnection = (Urho3D::Connection *) eventData[ClientConnected::P_CONNECTION].GetPtr();
- /// Output to screen
- cout << "New connection established {Clent}" << newConnection->ToString().CString() <<endl;
- /// Get currenttime
- Urho3D::Time systemtime(context_);
- unsigned int currenttime = systemtime.GetSystemTime();
- /// Get eventmap and time
- Urho3D::VariantMap NetworkClientIdentity(GetEventDataMap());
- NetworkClientIdentity[NetworkClientIdentity::NETWORK_CLIENTYPE]=Unauthenticated;
- NetworkClientIdentity[NetworkClientIdentity::NETWORK_CLIENTARRIVAL]= currenttime;
- /// Set Identity
- newConnection->SetIdentity(NetworkClientIdentity);
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement