void NetClient::ConnectToClients() { std::vector<NetDriver> vecDrivers; RobotXml robotxml; robotxml.ReadRobotDrivers(NETWORKROBOT,vecDrivers); for(unsigned int i=0;i<vecDrivers.size();i++) { ConnectToDriver(vecDrivers[i]); } }
void NetClient::SetCarInfo(const char *pszName) { std::vector<NetDriver> vecDrivers; RobotXml robotxml; robotxml.ReadRobotDrivers(NETWORKROBOT,vecDrivers); for (unsigned int i=0;i<vecDrivers.size();i++) { if (vecDrivers[i].name == m_strDriverName) { strncpy(vecDrivers[i].car,pszName,64); SendDriverInfoPacket(&vecDrivers[i]); } } }
void NetServer::SetCarInfo(const char *pszName) { std::vector<NetDriver> vecDrivers; RobotXml robotxml; robotxml.ReadRobotDrivers(NETWORKROBOT,vecDrivers); for (unsigned int i=0;i<vecDrivers.size();i++) { if (vecDrivers[i].name == m_strDriverName) { strncpy(vecDrivers[i].car,pszName,64); UpdateDriver(vecDrivers[i]); break; } } }