本文整理汇总了C++中CGameSettings::RunLock方法的典型用法代码示例。如果您正苦于以下问题:C++ CGameSettings::RunLock方法的具体用法?C++ CGameSettings::RunLock怎么用?C++ CGameSettings::RunLock使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGameSettings
的用法示例。
在下文中一共展示了CGameSettings::RunLock方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnFocus
void CFolderGame::OnFocus(LTBOOL bFocus)
{
CGameSettings *pSettings = g_pInterfaceMgr->GetSettings();
if (bFocus)
{
m_bGore = pSettings->Gore();
m_nDifficulty = g_pGameClientShell->GetDifficulty();
m_bFadeBodies = g_pGameClientShell->GetFadeBodies();
m_nSubtitles = (int)g_vtSubtitles.GetFloat();
m_bAlwaysRun = pSettings->RunLock();
m_nLayout = (int)g_vtHUDLayout.GetFloat();
m_nHeadBob = (int)(10.0f * GetConsoleFloat("HeadBob",1.0f));
m_nWeaponSway = (int)(10.0f * GetConsoleFloat("WeaponSway",1.0f));
m_nPickupMsgDur = (int)(2.0f * GetConsoleFloat("PickupMessageDuration",5.0f));
m_bObjMessages = ( GetConsoleInt("ObjectiveMessages",1) > 0 );
UpdateData(LTFALSE);
}
else
{
UpdateData();
pSettings->SetBoolVar("Gore",m_bGore);
g_vtSubtitles.WriteFloat((LTFLOAT)m_nSubtitles);
g_vtHUDLayout.WriteFloat((LTFLOAT)m_nLayout);
WriteConsoleInt("Difficulty",m_nDifficulty);
g_pGameClientShell->SetDifficulty((GameDifficulty)m_nDifficulty);
WriteConsoleInt("FadeBodies",(int)m_bFadeBodies);
g_pGameClientShell->SetFadeBodies(m_bFadeBodies);
pSettings->SetBoolVar("RunLock",m_bAlwaysRun);
WriteConsoleFloat("HeadBob",((LTFLOAT)m_nHeadBob / 10.0f));
WriteConsoleFloat("WeaponSway",((LTFLOAT)m_nWeaponSway / 10.0f));
WriteConsoleFloat("PickupMessageDuration",((LTFLOAT)m_nPickupMsgDur / 2.0f));
WriteConsoleInt("ObjectiveMessages",m_bObjMessages);
g_pLTClient->WriteConfigFile("autoexec.cfg");
}
CBaseFolder::OnFocus(bFocus);
}