本文整理汇总了C++中TiXmlElement::QueryVectorAttribute方法的典型用法代码示例。如果您正苦于以下问题:C++ TiXmlElement::QueryVectorAttribute方法的具体用法?C++ TiXmlElement::QueryVectorAttribute怎么用?C++ TiXmlElement::QueryVectorAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TiXmlElement
的用法示例。
在下文中一共展示了TiXmlElement::QueryVectorAttribute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadSettings
//.........这里部分代码省略.........
intervalsElement->QueryIntAttribute("fakekill", (int *)&settings.uiFakeKillInterval);
intervalsElement->QueryIntAttribute("lag", (int *)&settings.uiLagInterval);
intervalsElement->QueryIntAttribute("joinflood", (int *)&settings.uiJoinFloodInterval);
intervalsElement->QueryIntAttribute("chatflood", (int *)&settings.uiChatFloodInterval);
intervalsElement->QueryIntAttribute("classflood", (int *)&settings.uiClassFloodInterval);
intervalsElement->QueryIntAttribute("bulletflood", (int *)&settings.uiBulletFloodInterval);
}
// get logging settings
TiXmlElement* logElement = rakSAMPElement->FirstChildElement("log");
if(logElement)
{
logElement->QueryIntAttribute("objects", (int *)&settings.uiObjectsLogging);
logElement->QueryIntAttribute("pickups", (int *)&settings.uiPickupsLogging);
logElement->QueryIntAttribute("textlabels", (int *)&settings.uiTextLabelsLogging);
logElement->QueryIntAttribute("textdraws", (int *)&settings.uiTextDrawsLogging);
}
// get sendrates settings
TiXmlElement* sendratesElement = rakSAMPElement->FirstChildElement("sendrates");
if(sendratesElement)
{
sendratesElement->QueryIntAttribute("force", (int *)&settings.uiForceCustomSendRates);
sendratesElement->QueryIntAttribute("onfoot", (int *)&iNetModeNormalOnfootSendRate);
sendratesElement->QueryIntAttribute("incar", (int *)&iNetModeNormalIncarSendRate);
sendratesElement->QueryIntAttribute("firing", (int *)&iNetModeFiringSendRate);
sendratesElement->QueryIntAttribute("multiplier", (int *)&iNetModeSendMultiplier);
}
// get normal mode pos
TiXmlElement* normalPosElement = rakSAMPElement->FirstChildElement("normal_pos");
if(normalPosElement)
{
normalPosElement->QueryVectorAttribute("position", (float *)&settings.fNormalModePos);
normalPosElement->QueryFloatAttribute("rotation", &settings.fNormalModeRot);
normalPosElement->QueryIntAttribute("force", (int *)&settings.iNormalModePosForce);
}
// get auto run commands
TiXmlElement* autorunElement = rakSAMPElement->FirstChildElement("autorun");
if(autorunElement)
{
for(int i = 0; i < MAX_AUTORUN_CMDS; i++)
{
if(autorunElement)
{
settings.autoRunCMDs[i].iExists = 1;
strcpy(settings.autoRunCMDs[i].szCMD, autorunElement->GetText());
autorunElement = autorunElement->NextSiblingElement("autorun");
}
else
break;
}
}
TiXmlElement* findElement = rakSAMPElement->FirstChildElement("find");
if(findElement)
{
for(int i = 0; i < MAX_FIND_ITEMS; i++)
{
if(findElement)
{
settings.findItems[i].iExists = 1;
strcpy(settings.findItems[i].szFind, findElement->Attribute("text"));
strcpy(settings.findItems[i].szSay, findElement->Attribute("say"));
findElement->QueryColorAttribute("bk_color",