void plNetMessage::InitReplyFieldsFrom(plNetMessage * msg) { bool hasContext = msg->GetHasContext(); SetHasContext(hasContext); if (hasContext) SetContext(msg->GetContext()); bool hasTransactionID = msg->GetHasTransactionID(); SetHasTransactionID(hasTransactionID); if (hasTransactionID) SetTransactionID(msg->GetTransactionID()); bool hasPlayerID = msg->GetHasPlayerID(); if ( hasPlayerID ) SetPlayerID( msg->GetPlayerID() ); bool hasAcctUUID = msg->GetHasAcctUUID(); if ( hasAcctUUID ) SetAcctUUID( msg->GetAcctUUID() ); bool hasTimeSent = msg->GetHasTimeSent(); if ( hasTimeSent ) SetTimeSent( msg->GetTimeSent() ); #if 0 // I don't think the version should be copied if (msg->IsBitSet(kHasVersion)) SetVersion(); #endif }
LanPlayer::LanPlayer(const MString &Name, const int PlayerID) { m_name = Name; SetPlayerID(PlayerID); ClearStats(); m_screenpos = 1; //we know stuff }