本文整理汇总了C++中game_import_t::cvar_set方法的典型用法代码示例。如果您正苦于以下问题:C++ game_import_t::cvar_set方法的具体用法?C++ game_import_t::cvar_set怎么用?C++ game_import_t::cvar_set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类game_import_t
的用法示例。
在下文中一共展示了game_import_t::cvar_set方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: va
void
CheckNeedPass(void)
{
int need;
/* if password or spectator_password has
changed, update needpass as needed */
if (password->modified || spectator_password->modified)
{
password->modified = spectator_password->modified = false;
need = 0;
if (*password->string && Q_stricmp(password->string, "none"))
{
need |= 1;
}
if (*spectator_password->string &&
Q_stricmp(spectator_password->string, "none"))
{
need |= 2;
}
gi.cvar_set("needpass", va("%d", need));
}
}
示例2: G_InitCvars
/*
============
G_InitCvars
============
*/
void G_InitCvars( void ) {
// don't override the cheat state set by the system
g_cheats = gi.cvar ("helpUsObi", "", 0);
g_developer = gi.cvar ("developer", "", 0);
// noset vars
gi.cvar( "gamename", GAMEVERSION , CVAR_SERVERINFO | CVAR_ROM );
gi.cvar( "gamedate", __DATE__ , CVAR_ROM );
g_skippingcin = gi.cvar ("skippingCinematic", "0", CVAR_ROM);
// latched vars
// change anytime vars
g_speed = gi.cvar( "g_speed", "250", CVAR_CHEAT );
g_gravity = gi.cvar( "g_gravity", "800", CVAR_USERINFO|CVAR_ROM ); //using userinfo as savegame flag
g_sex = gi.cvar ("sex", "male", CVAR_USERINFO | CVAR_ARCHIVE );
g_spskill = gi.cvar ("g_spskill", "0", CVAR_ARCHIVE | CVAR_USERINFO); //using userinfo as savegame flag
g_knockback = gi.cvar( "g_knockback", "1000", CVAR_CHEAT );
g_dismemberment = gi.cvar ( "g_dismemberment", "3", CVAR_ARCHIVE );//0 = none, 1 = arms and hands, 2 = legs, 3 = waist and head, 4 = mega dismemberment
g_dismemberProbabilities = gi.cvar ( "g_dismemberProbabilities", "1", CVAR_ARCHIVE );//0 = ignore probabilities, 1 = use probabilities
g_synchSplitAnims = gi.cvar ( "g_synchSplitAnims", "1", 0 );
g_inactivity = gi.cvar ("g_inactivity", "0", 0);
g_debugMove = gi.cvar ("g_debugMove", "0", CVAR_CHEAT );
g_debugDamage = gi.cvar ("g_debugDamage", "0", CVAR_CHEAT );
g_ICARUSDebug = gi.cvar( "g_ICARUSDebug", "0", CVAR_CHEAT );
g_timescale = gi.cvar( "timescale", "1", 0 );
g_subtitles = gi.cvar( "g_subtitles", "2", CVAR_ARCHIVE );
com_buildScript = gi.cvar ("com_buildscript", "0", 0);
g_saberAutoBlocking = gi.cvar( "g_saberAutoBlocking", "1", CVAR_ARCHIVE|CVAR_CHEAT );//must press +block button to do any blocking
g_saberRealisticCombat = gi.cvar( "g_saberRealisticCombat", "0", CVAR_ARCHIVE|CVAR_CHEAT );//makes collision more precise, increases damage
g_saberMoveSpeed = gi.cvar( "g_saberMoveSpeed", "1", CVAR_ARCHIVE|CVAR_CHEAT );//how fast you run while attacking with a saber
g_saberAnimSpeed = gi.cvar( "g_saberAnimSpeed", "1", CVAR_ARCHIVE|CVAR_CHEAT );//how fast saber animations run
g_saberAutoAim = gi.cvar( "g_saberAutoAim", "1", CVAR_ARCHIVE|CVAR_CHEAT );//auto-aims at enemies when not moving or when just running forward
g_AIsurrender = gi.cvar( "g_AIsurrender", "0", CVAR_CHEAT );
g_numEntities = gi.cvar( "g_numEntities", "0", CVAR_CHEAT );
gi.cvar( "newTotalSecrets", "0", CVAR_ROM );
gi.cvar_set("newTotalSecrets", "0");//used to carry over the count from SP_target_secret to ClientBegin
g_iscensored = gi.cvar( "ui_iscensored", "0", CVAR_ARCHIVE|CVAR_ROM|CVAR_INIT|CVAR_CHEAT|CVAR_NORESTART );
}