本文整理汇总了C++中CVarTrack::GetStr方法的典型用法代码示例。如果您正苦于以下问题:C++ CVarTrack::GetStr方法的具体用法?C++ CVarTrack::GetStr怎么用?C++ CVarTrack::GetStr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CVarTrack
的用法示例。
在下文中一共展示了CVarTrack::GetStr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SendTriggerMsgToObject
void SendTriggerMsgToObject(LPBASECLASS pSender, HOBJECT hObj, HSTRING hMsg)
{
HMESSAGEWRITE hMessage;
char *pSendName, *pRecvName, *pFilter;
char* szMessage = g_pLTServer->GetStringData(hMsg);
// Process the message as a command if it is a valid command...
if (g_pCmdMgr->IsValidCmd(szMessage))
{
g_pCmdMgr->Process(szMessage);
return;
}
hMessage = g_pLTServer->StartMessageToObject(pSender, hObj, MID_TRIGGER);
if (hMessage)
{
if (g_ShowTriggersTrack.GetFloat() != 0.0f)
{
if (pSender) pSendName = g_pLTServer->GetObjectName(pSender->m_hObject);
else pSendName = "Command Manager";
pRecvName = g_pLTServer->GetObjectName(hObj);
pFilter = g_ShowTriggersFilter.GetStr();
// Filter out displaying any unwanted messages...
LTBOOL bPrintMsg = (!pFilter || !pFilter[0]);
if (!bPrintMsg)
{
bPrintMsg = (szMessage ? !strstr(pFilter, szMessage) : LTTRUE);
}
if (bPrintMsg)
{
g_pLTServer->CPrint("Message: %s", szMessage ? szMessage : "NULL");
g_pLTServer->CPrint(" Sent from '%s', to '%s'", pSendName, pRecvName);
}
}
g_pLTServer->WriteToMessageDWord(hMessage, (uint32)g_pLTServer->GetStringData(hMsg));
g_pLTServer->EndMessage(hMessage);
}
}