Exemplo n.º 1
0
CMaterialEffectsCVars::CMaterialEffectsCVars()
{
	assert (s_pThis == 0);
	s_pThis = this;

	REGISTER_CVAR(mfx_ParticleImpactThresh, 2.0f, VF_CHEAT, "Impact threshold for particle effects. Default: 2.0" );
	REGISTER_CVAR(mfx_SoundImpactThresh, 1.5f, VF_CHEAT, "Impact threshold for sound effects. Default: 1.5" );
	REGISTER_CVAR(mfx_RaisedSoundImpactThresh, 3.5f, VF_CHEAT, "Impact threshold for sound effects if we're rolling. Default: 3.5" );
	REGISTER_CVAR(mfx_Debug, 0, 0, "Turns on MaterialEffects debug messages. 1=Collisions, 2=Breakage, 3=Both" );
	REGISTER_CVAR(mfx_DebugVisual, 0, 0, "Turns on/off visual debugging for MFX system");
	mfx_DebugVisualFilter = REGISTER_STRING("mfx_DebugVisualFilter","",VF_CHEAT,"");
	REGISTER_CVAR(mfx_DebugFlowGraphFX, 0, 0, "Turns on Material FlowGraph FX manager debug messages." );
	REGISTER_CVAR(mfx_Enable, 1, VF_CHEAT, "Enables MaterialEffects." );
	REGISTER_CVAR(mfx_pfx_minScale, .5f, 0, "Min scale (when particle is close)");
	REGISTER_CVAR(mfx_pfx_maxScale, 1.5f, 0, "Max scale (when particle is far)");
	REGISTER_CVAR(mfx_pfx_maxDist, 35.0f, 0, "Max dist (how far away before scale is clamped)");
	REGISTER_CVAR(mfx_Timeout, 0.01f, 0, "Timeout (in seconds) to avoid playing effects too often");
	REGISTER_CVAR(mfx_EnableFGEffects, 1, VF_CHEAT, "Enabled Flowgraph based Material effects. Default: On" );
	REGISTER_CVAR(mfx_EnableAttachedEffects, 1, VF_CHEAT, "Enable attached effects (characters, entities...)");
	REGISTER_CVAR(mfx_SerializeFGEffects, 1, VF_CHEAT, "Serialize Flowgraph based effects. Default: On" );

	//FlowGraph HUD effects
	REGISTER_COMMAND("mfx_ReloadFGEffects", FGEffectsReload, 0, "Reload MaterialEffect's FlowGraphs");
	//Reload Excel Spreadsheet
	REGISTER_COMMAND("mfx_Reload", MFXReload, 0, "Reload MFX Spreadsheet");
}
Exemplo n.º 2
0
void RegisterCommands()
{
    REGISTER_COMMAND( "mn_reload", MN_ReloadAll, VF_CHEAT, "Reloads animation databases" );
    REGISTER_COMMAND( "mn_listAssets", MN_ListAssets, VF_CHEAT, "Lists all the currently referenced animation assets" );
    REGISTER_COMMAND( "mn_DebugAI", MN_DebugAI, VF_CHEAT, "" );
    REGISTER_CVAR3("mn_LogToFile", mn_logToFile, 0, VF_CHEAT, "Dumps all mann event logging to the file" );
}
SForceFeedbackSystemCVars::SForceFeedbackSystemCVars()
{
	REGISTER_CVAR(ffs_debug, 0, 0, "Turns on/off force feedback system debug." );

	REGISTER_COMMAND("ffs_PlayEffect", FFSPlayEffect, 0, "Play force feedback effect, passed by name as first parameter");
	REGISTER_COMMAND("ffs_StopAllEffects", FFSStopAllEffects, 0, "Stop force feedback effect, passed by name as first parameter");
	REGISTER_COMMAND("ffs_Reload", FFSReload, 0, "Reload force feedback system data");
}
Exemplo n.º 4
0
CDownloadMgr::CDownloadMgr() :
	CGameMechanismBase("DownloadMgr")
{
#if DOWNLOAD_MGR_DBG
	REGISTER_COMMAND(k_dlm_list, (ConsoleCommandFunc)DbgList, 0, "Lists all the resources the download mgr knows about and their state");
	REGISTER_COMMAND(k_dlm_cat, (ConsoleCommandFunc)DbgCat, 0, "Outputs the specified resource as text to the console");
	REGISTER_COMMAND(k_dlm_purge, (ConsoleCommandFunc)DbgPurge, 0, "Removes any downloaded data for the specified resource");
#endif
}
//---------------------------------------
CAreaAnnouncer::CAreaAnnouncer()
{
	REGISTER_CVAR(aa_peopleNeeded, aa_peopleNeeded, VF_NULL, "Number of people needed to play area announcement");
	REGISTER_CVAR(aa_enabled, aa_enabled, VF_NULL, "Stops area announcements being played or updated");
	
#if !defined(_RELEASE)
	REGISTER_CVAR(aa_debug, aa_debug, VF_NULL, "Enable/Disables Area announcer debug messages");
	REGISTER_COMMAND("aa_play", CmdPlay, VF_CHEAT, "play area announcement");
	REGISTER_COMMAND("aa_reload", CmdReload, VF_CHEAT, "Init area announcement");
#endif
}
Exemplo n.º 6
0
void SCVars::InitCVars(IConsole *pConsole)
{
	EVarFlags nullOrCheatFlag = VF_NULL;
#ifdef RELEASE
	nullOrCheatFlag = VF_CHEAT;
#endif

	REGISTER_CVAR(mono_exceptionsTriggerMessageBoxes, 1, VF_NULL, "If true, exceptions will trigger a message box to appear");
	REGISTER_CVAR(mono_exceptionsTriggerFatalErrors, 0, VF_NULL, "If true, exceptions will trigger a fatal error");

	REGISTER_CVAR(mono_realtimeScripting, 1, nullOrCheatFlag, "Enables / Disables Realtime Scripting functionality. (Editor-only)");
	REGISTER_CVAR(mono_realtimeScriptingDebug, 0, nullOrCheatFlag, "Toggles on realtime scripting debug, useful for finding serialization bugs");
	REGISTER_CVAR(mono_realtimeScriptingDetectChanges, 1, nullOrCheatFlag, "Toggles whether realtime scripting should automatically reload scripts when any *.cs file is modified in the scripts directory.");

	REGISTER_CVAR(mono_softBreakpoints, 1, VF_REQUIRE_APP_RESTART, "[Performance Warning] Enables / Disables soft breakpoints, preventing managed null reference exceptions causing crashes in unmanaged code. \n Not supported along with -DEBUG command line option");

	REGISTER_CVAR(mono_generateMdbIfPdbIsPresent, 1, VF_NULL, "Toggles on mono debug database (.mdb) generation, if a pdb file is present");

	REGISTER_CVAR(mono_compileScripts, 1, nullOrCheatFlag, "Determines whether source files found in the Scripts directory will be compiled and loaded");
	REGISTER_CVAR(mono_scriptDirectory, "", nullOrCheatFlag, "If set, CryMono will attempt to load its script files (e.g. *.cs) from this directory. Full path only.");

	REGISTER_CVAR(mono_entityDeleteExtensionOnNetworkBindFailure, 1, nullOrCheatFlag, "If set, the game object extension will delete itself if IGameObject::BindToNetwork returns false in the IGameObjectExtension::Init function");

	REGISTER_CVAR(mono_log, 0, VF_CHEAT, "");

	REGISTER_COMMAND("mono_reload", CmdReload, nullOrCheatFlag, "[Realtime Scripting] Reloads / recompiles all scripts");
}
CGameTokenSystem::CGameTokenSystem()
{
	CGameToken::g_pGameTokenSystem = this;
	m_pScriptBind = new CScriptBind_GameToken(this);
	m_pGameTokensMap = new GameTokensMap();

#ifdef _GAMETOKENSDEBUGINFO	
	m_debugHistory.resize( DBG_HISTORYSIZE );
	ClearDebugHistory();
	REGISTER_CVAR2("gt_show", &CGameTokenSystem::m_CVarShowDebugInfo, 0, 0, "Show Game Tokens debug info. 1=screen and log, 2=screen only, 3=log only");
	REGISTER_CVAR2("gt_showPosX", &CGameTokenSystem::m_CVarPosX, 0, 0, "Defines the starting column in screen for game tokens debug info");
	REGISTER_CVAR2("gt_showPosY", &CGameTokenSystem::m_CVarPosY, 0, 0, "Defines the starting line in screen for game tokens debug info");
	REGISTER_CVAR2("gt_showLines", &CGameTokenSystem::m_CVarNumHistoricLines, DBG_HISTORYSIZE, 0, "How many lines is used by the historic list");
	m_pCVarFilter = REGISTER_STRING("gt_showFilter", NULL, VF_NULL, "In the historic list only shows game tokens that include the filter string" );
	REGISTER_COMMAND( "gt_AddToDebugList", AddGameTokenToDebugList, VF_CHEAT,"Adds a game token by name to the list of game tokens to be shown on screen" );
	REGISTER_COMMAND( "gt_RemoveFromDebugList", RemoveGameTokenFromDebugList, VF_CHEAT,"Removes a game token by name from the list of game tokens to be shown on screen" );
#endif
}
Exemplo n.º 8
0
CGameLocalizationManager::CGameLocalizationManager()
{
	LoadLocalizationData();

	gEnv->pSystem->GetISystemEventDispatcher()->RegisterListener(this);

#if !defined(_RELEASE)
	REGISTER_COMMAND("LocalizationDumpLoadedTags", LocalizationDumpLoadedTags, VF_NULL, "Dump out into about the loaded localization tags");
#endif //#if !defined(_RELEASE)
}
Exemplo n.º 9
0
OSpit::OSpit(MohawkEngine_Riven *vm) :
		RivenStack(vm, kStackOspit) {

	REGISTER_COMMAND(OSpit, xorollcredittime);
	REGISTER_COMMAND(OSpit, xbookclick);
	REGISTER_COMMAND(OSpit, xooffice30_closebook);
	REGISTER_COMMAND(OSpit, xobedroom5_closedrawer);
	REGISTER_COMMAND(OSpit, xogehnopenbook);
	REGISTER_COMMAND(OSpit, xogehnbookprevpage);
	REGISTER_COMMAND(OSpit, xogehnbooknextpage);
	REGISTER_COMMAND(OSpit, xgwatch);
}
Exemplo n.º 10
0
PSpit::PSpit(MohawkEngine_Riven *vm) :
		DomeSpit(vm, kStackPspit, "psliders.25", "psliderbg.25") {

	REGISTER_COMMAND(PSpit, xpisland990_elevcombo);
	REGISTER_COMMAND(PSpit, xpscpbtn);
	REGISTER_COMMAND(PSpit, xpisland290_domecheck);
	REGISTER_COMMAND(PSpit, xpisland25_opencard);
	REGISTER_COMMAND(PSpit, xpisland25_resetsliders);
	REGISTER_COMMAND(PSpit, xpisland25_slidermd);
	REGISTER_COMMAND(PSpit, xpisland25_slidermw);
}
Exemplo n.º 11
0
CFeatureTestMgr::CFeatureTestMgr()
:	m_runningTestIndex(),
	m_pRunningTest(),
	m_pAutoTester(),
	m_running(),
	m_pendingRunAll(),
	m_pendingQuickload(),
	m_pendingLevelReload(),
	m_hasQuickloaded(),
	m_timeWaitedForScheduled(0.0f),
	m_waiting(false),
	m_timeoutScheduled(0.0f),
	m_testManifestWritten(false)
{
	IConsole* pConsole = GetISystem()->GetIConsole();

	if (pConsole)
	{
		REGISTER_COMMAND("ft_map_runAll", CmdMapRunAll, VF_CHEAT, "FEATURE TESTER: Run all enabled map feature tests");
		REGISTER_COMMAND("ft_map_forceRun", CmdMapForceRun, VF_CHEAT, "FEATURE TESTER: Force run of the provided test (even if it's not ready)");
		pConsole->RegisterAutoComplete("ft_map_forceRun", &s_featureTestMgrArgumentAutoComplete);
	}
}
//-----------------------------------------------------------------------------------------------------
ScreenLayoutManager::ScreenLayoutManager( )
: m_flags(eSLO_Default)
, m_modelViewMatrix(IDENTITY)
, m_projectionMatrix(IDENTITY)
{
	assert(!s_inst);
	s_inst = this;

	REGISTER_COMMAND("HUD_setCustomSafeArea",SetSafeArea,VF_CHEAT,"Set a custom safe area 0->1 is proportion or, >1 is an ID.");

	m_curSafeAreaID = eHSAID_default;

	UpdateHUDCanvasSize();
}
Exemplo n.º 13
0
void SCVars::InitCVars(IConsole *pConsole)
{
	REGISTER_CVAR(mono_exceptionsTriggerMessageBoxes, 1, VF_NULL, "If true, exceptions will trigger a message box to appear");
	REGISTER_CVAR(mono_exceptionsTriggerFatalErrors, 0, VF_NULL, "If true, exceptions will trigger a fatal error");

	REGISTER_CVAR(mono_realtimeScripting, 1, VF_NULL, "Enables / Disables Realtime Scripting functionality. (Editor-only)");
	
#ifndef RELEASE
	REGISTER_CVAR(mono_realtimeScriptingDebug, 1, VF_NULL, "Toggles on realtime scripting debug, useful for finding serialization bugs");
#endif

	REGISTER_CVAR(mono_realtimeScriptingDetectChanges, 1, VF_NULL, "Toggles whether realtime scripting should automatically reload scripts when any *.cs file is modified in the scripts directory.");
	REGISTER_COMMAND("mono_reload", CmdReload, VF_NULL, "[Realtime Scripting] Reloads / recompiles all scripts");

	REGISTER_CVAR(mono_softBreakpoints, 1, VF_REQUIRE_APP_RESTART, "[Performance Warning] Enables / Disables soft breakpoints, preventing managed null reference exceptions causing crashes in unmanaged code. \n Not supported along with -DEBUG command line option");
}
Exemplo n.º 14
0
//===============================
void InjectModule::Initialize(shared_ptr<Game> pGame)
{
  if (!pGame) return;
    
  m_pGame = pGame;
    
  shared_ptr<CommandHandler> pCmdHandler = pGame->GetCommandHandler();
  
  //Register commands to the command handler.
  if (pCmdHandler) {    
    BEGIN_REGISTER_COMMANDS(pCmdHandler);
  
    REGISTER_COMMAND(InjectCmd);
    
    END_REGISTER_COMMANDS();
  }
}
Exemplo n.º 15
0
bool CEditorGame::Init(ISystem *pSystem,IGameToEditorInterface *pGameToEditorInterface)
{
	assert(pSystem);

	SSystemInitParams startupParams;
	startupParams.bEditor = true;
	startupParams.pSystem = pSystem;
	startupParams.bExecuteCommandLine=false;		// in editor we do it later - after other things are initialized

	m_pGameStartup = CreateGameStartup();

	m_pGame = m_pGameStartup->Init(startupParams);

	if (!m_pGame)
	{
		return false;
	}

	IGameFramework* pGameFramework = m_pGame->GetIGameFramework();
	if ( pGameFramework != NULL )
	{
		pGameFramework->InitEditor( pGameToEditorInterface );
	}

	InitUIEnums(pGameToEditorInterface);

	gEnv->bServer = true;
	gEnv->bMultiplayer = false;

#if !defined(XENON) && !defined(PS3) && !defined(GRINGO)
	gEnv->SetIsClient(true);
#endif

	m_bUsingMultiplayerGameRules = false;

	s_pEditorGameMode = REGISTER_INT( "net_gamemode", 0, 0, "Should editor connect a new client?");
	s_pEditorGameMode->SetOnChangeCallback(&OnChangeEditorMode);

	SetGameMode(false);

	REGISTER_COMMAND( "net_reseteditorclient", ResetClient, 0, "Resets player and gamerules!" );

	ConfigureNetContext(true);
		
	return true;
}
Exemplo n.º 16
0
//-------------------------------------------------------------------------
void CGameRulesStandardState::PostInit()
{
	REGISTER_COMMAND("g_setgamestate", CmdSetState, VF_NULL, "Force game state (0=Reset, 1=PreGame, 2=InGame, 3=PostGame");

	// Gather list of initially connecting clients to wait for before starting		
	if (CGameLobby* pGameLobby = g_pGame->GetGameLobby())
	{
		const SSessionNames &sessionNames = pGameLobby->GetSessionNames();

		const int numPlayers = sessionNames.Size();
		for (int i = 0; i < numPlayers; ++ i)
		{
			const int channelId = (int)sessionNames.m_sessionNames[i].m_conId.m_uid;
			m_initialChannelIds.push_back(channelId);
			CryLog("CGameRulesStandardState::PostInit(), Initial player channels, adding %d)", channelId);
		}
	}
}
Exemplo n.º 17
0
bool CEditorGame::Init(ISystem *pSystem,IGameToEditorInterface *pGameToEditorInterface)
{
	assert(pSystem);

	SSystemInitParams startupParams;
    FillSystemInitParams(startupParams, pSystem);

	m_pGameStartup = CreateGameStartup();

	m_pGame = m_pGameStartup->Init(startupParams);

	if (!m_pGame)
	{
		return false;
	}

	InitUIEnums(pGameToEditorInterface);

	m_pGame->GetIGameFramework()->InitEditor(pGameToEditorInterface);

	m_pEquipmentSystemInterface = new CEquipmentSystemInterface(this, pGameToEditorInterface);

	gEnv->bServer = true;
	gEnv->bMultiplayer = false;

#if !defined(CONSOLE)
	gEnv->SetIsClient(true);
#endif

	m_bUsingMultiplayerGameRules = (g_pGameCVars->g_multiplayerDefault != 0);

	if (IConsole* pConsole = gEnv->pConsole)
		s_pEditorGameMode = REGISTER_INT_CB("net_gamemode", 0, VF_NULL, "Should editor connect a new client?", &OnChangeEditorMode);

	SetGameMode(false);

	REGISTER_COMMAND( "net_reseteditorclient", ResetClient, VF_NULL, "Resets player and gamerules!" );

	ConfigureNetContext(true);

	g_pGame->OnEditorGameInitComplete();
		
	return true;
}
Exemplo n.º 18
0
Arquivo: cmds.cpp Projeto: ftk/niceamx
static void init()
{
	REGISTER_COMMAND("test1", api::cmdflag::ALL, ([](api::cmdinfo_t info)
	{
		api::parser p("sd+", info);
		api::send_pipe_msg(info.caller, "start");
		for(int i = 0; i < p.size(); i++)
		{
			api::send_pipe_msg(info.caller, p[i]);
		}
	}));
	
	
	bool ok = INVOKE_COMMANDS(api::pipe::LOG, api::cmdflag::CONFIG, "  : \"echo tttt\" test1 t 1 2 3 4 5 6 7 8 9");
	
	api::send_pipe_msgf(api::pipe::STDOUT, "%d", ok);
	api::send_pipe_msg(api::pipe::STDOUT, "test {00FFFF} {FFFFFF}{000000}test");
	
	//pawn::log << "hello" << 0 << ' ' << "world\n!!!!!" << std::endl;
}
Exemplo n.º 19
0
/**
 *	Register DMM console commands with
 *	the Doom3 engine.
 */
void register_console_commands() {
	#ifdef DMM_DETAIL
		CONSOLE_PRINTF(CINFO "Registering console commands ...\n");
	#endif

	int i = 0;
	while (dmm_cmds[i].cmdName) {
		#ifdef DMM_DETAIL
			CONSOLE_PRINTF(CINFO "  Registering command: \"%s\"\n", dmm_cmds[i].cmdName);
		#endif
		
		REGISTER_COMMAND(dmm_cmds[i].cmdName, dmm_cmds[i].function, dmm_cmds[i].flags,
			dmm_cmds[i].description, dmm_cmds[i].argCompletion);
		
		++i;
	}

	#ifdef DMM_DETAIL
		CONSOLE_PRINTF(CINFO "Attempted to register %i command%s.\n", i, GRAMMAR_PLURAL(i));
	#endif
}
CCodeCheckpointDebugMgr::CCodeCheckpointDebugMgr()
:REGISTER_GAME_MECHANISM(CCodeCheckpointDebugMgr),m_timeSinceLastRun(0)
{
	m_debug_ccoverage = 0;
	m_debug_ccoverage_rate = 0.05f;
	m_debug_ccoverage_maxlines = 10;
	m_debug_ccoverage_filter_maxcount = 0;
	m_debug_ccoverage_filter_mincount = 0;

	REGISTER_COMMAND("ft_debug_checkpoint_search", CmdCodeCheckPointSearch, VF_CHEAT, "FEATURE TESTER: Search for code checkpoints that have been encountered by substring");

	REGISTER_CVAR2("ft_debug_ccoverage", &m_debug_ccoverage, m_debug_ccoverage, VF_CHEAT, "FEATURE TESTER: Turn on debug drawing of code checkpoints. 1 = watched checkpoints only. 2 = unwatched only. 3 = both with watched higher priority. 4 = both equal prioirity");
	REGISTER_CVAR2("ft_debug_ccoverage_rate", &m_debug_ccoverage_rate, m_debug_ccoverage_rate, VF_CHEAT, "FEATURE TESTER: Max number of code checkpoints to output");
	REGISTER_CVAR2("ft_debug_ccoverage_maxlines", &m_debug_ccoverage_maxlines, m_debug_ccoverage_maxlines, VF_CHEAT, "FEATURE TESTER: Max number of code checkpoints to output");
	REGISTER_CVAR2("ft_debug_ccoverage_filter_maxcount", &m_debug_ccoverage_filter_maxcount, m_debug_ccoverage_filter_maxcount, VF_CHEAT, "FEATURE TEST: Only print out checkpoints with less than this number of hits");
	REGISTER_CVAR2("ft_debug_ccoverage_filter_mincount", &m_debug_ccoverage_filter_mincount, m_debug_ccoverage_filter_mincount, VF_CHEAT, "FEATURE TEST: Only print out checkpoints with more than this number of hit");

	string filePath = PathUtil::Make( "../USER", "CodeCheckpointList.txt" );
	ReadFile(filePath.c_str());

}
Exemplo n.º 21
0
static void init_tcl(Tcl_Interp *interp)
{
  char cwd[1024];
  char *scriptdir;

  /*
    installation of tcl commands
  */

  /* in cells.c */
  REGISTER_COMMAND("cellsystem", tclcommand_cellsystem);
  /* in integrate.c */
  REGISTER_COMMAND("invalidate_system", tclcommand_invalidate_system);
  REGISTER_COMMAND("integrate", tclcommand_integrate);
  /* in global.c */
  REGISTER_COMMAND("setmd", tclcommand_setmd);
  /* in grid.c */
  REGISTER_COMMAND("change_volume", tclcommand_change_volume);
  /* in global.c */
  REGISTER_COMMAND("code_info", tclcommand_code_info);
  /* in interaction_data.c */
  REGISTER_COMMAND("inter",tclcommand_inter);
  /* in particle_data.c */
  REGISTER_COMMAND("part",tclcommand_part);
  /* in file binaryfile.c */
  REGISTER_COMMAND("writemd", tclcommand_writemd);
  REGISTER_COMMAND("readmd", tclcommand_readmd);
  /* in file statistics.c */
  REGISTER_COMMAND("analyze", tclcommand_analyze);
  /* in file polymer.c */
  REGISTER_COMMAND("polymer", tclcommand_polymer);
  REGISTER_COMMAND("counterions", tclcommand_counterions);
  REGISTER_COMMAND("salt", tclcommand_salt);
  REGISTER_COMMAND("velocities", tclcommand_velocities);
  REGISTER_COMMAND("maxwell_velocities", tclcommand_maxwell_velocities);
  REGISTER_COMMAND("crosslink", tclcommand_crosslink);
  REGISTER_COMMAND("diamond", tclcommand_diamond);
  REGISTER_COMMAND("icosaeder", tclcommand_icosaeder);
  /* in file imd.c */
  REGISTER_COMMAND("imd", tclcommand_imd);
  /* in file random.c */
  REGISTER_COMMAND("t_random", tclcommand_t_random);
  REGISTER_COMMAND("bit_random", tclcommand_bit_random);
  /* in file blockfile_tcl.c */
  REGISTER_COMMAND("blockfile", tclcommand_blockfile);
  /* in constraint.c */
  REGISTER_COMMAND("constraint", tclcommand_constraint);
  /* in uwerr.c */
  REGISTER_COMMAND("uwerr", tclcommand_uwerr);
  /* in nemd.c */
  REGISTER_COMMAND("nemd", tclcommand_nemd);
  /* in thermostat.c */
  REGISTER_COMMAND("thermostat", tclcommand_thermostat);
  /* in bin.c */
  REGISTER_COMMAND("bin", tclcommand_bin);
  /* in lb.c */

  REGISTER_COMMAND("lbfluid", tclcommand_lbfluid);
  REGISTER_COMMAND("lbnode", tclcommand_lbnode);
  REGISTER_COMMAND("lbboundary", tclcommand_lbboundary);
  /* in utils.h */
  REGISTER_COMMAND("replacestdchannel", tclcommand_replacestdchannel);
  /* in iccp3m.h */
#ifdef ELECTROSTATICS
#ifdef ELP3M
  REGISTER_COMMAND("iccp3m", tclcommand_iccp3m);
#endif 
#endif 
  /* in adresso.h */
  REGISTER_COMMAND("adress", tclcommand_adress);
#ifdef ADRESS
  /** #ifdef THERMODYNAMIC_FORCE */
  REGISTER_COMMAND("thermodynamic_force", tclcommand_thermodynamic_force);
  /** #endif */
  REGISTER_COMMAND("update_adress_weights", tclcommand_update_adress_weights);
#endif
#ifdef METADYNAMICS
  /* in metadynamics.c */
  REGISTER_COMMAND("metadynamics", tclcommand_metadynamics);
#endif
#ifdef LB_GPU
  /* in lbgpu_cfile.c */
  REGISTER_COMMAND("lbnode_exf", tclcommand_lbnode_extforce_gpu);

  REGISTER_COMMAND("lbprint", tclcommand_lbprint_gpu);
#endif
#ifdef CUDA
  REGISTER_COMMAND("cuda", tclcommand_cuda);
#endif

  /* evaluate the Tcl initialization script */
  scriptdir = getenv("ESPRESSO_SCRIPTS");
  if (!scriptdir)
    scriptdir = get_default_scriptsdir();
  
  fprintf(stderr,"%d: Script directory: %s\n", this_node, scriptdir);

  if ((getcwd(cwd, 1024) == NULL) || (chdir(scriptdir) != 0)) {
    fprintf(stderr,
	    "\n\ncould not change to script dir %s, please check ESPRESSO_SCRIPTS.\n\n\n",
	    scriptdir);
    exit(-1);
  }
  if (Tcl_EvalFile(interp, "init.tcl") == TCL_ERROR) {
    fprintf(stderr, "\n\nerror in initialization script: %s\n\n\n",
	    Tcl_GetStringResult(interp));
    exit(-1);
  }
  if (chdir(cwd) != 0) {
    fprintf(stderr,
	    "\n\ncould not change back to execution dir %s ????\n\n\n",
	    cwd);
    exit(-1);
  }
}
Exemplo n.º 22
0
ASpit::ASpit(MohawkEngine_Riven *vm) :
		RivenStack(vm, kStackAspit) {

	REGISTER_COMMAND(ASpit, xastartupbtnhide);
	REGISTER_COMMAND(ASpit, xasetupcomplete);
	REGISTER_COMMAND(ASpit, xaatrusopenbook);
	REGISTER_COMMAND(ASpit, xaatrusbookback);
	REGISTER_COMMAND(ASpit, xaatrusbookprevpage);
	REGISTER_COMMAND(ASpit, xaatrusbooknextpage);
	REGISTER_COMMAND(ASpit, xacathopenbook);
	REGISTER_COMMAND(ASpit, xacathbookback);
	REGISTER_COMMAND(ASpit, xacathbookprevpage);
	REGISTER_COMMAND(ASpit, xacathbooknextpage);
	REGISTER_COMMAND(ASpit, xtrapbookback);
	REGISTER_COMMAND(ASpit, xatrapbookclose);
	REGISTER_COMMAND(ASpit, xatrapbookopen);
	REGISTER_COMMAND(ASpit, xarestoregame);
	REGISTER_COMMAND(ASpit, xadisablemenureturn);
	REGISTER_COMMAND(ASpit, xaenablemenureturn);
	REGISTER_COMMAND(ASpit, xalaunchbrowser);
	REGISTER_COMMAND(ASpit, xadisablemenuintro);
	REGISTER_COMMAND(ASpit, xaenablemenuintro);
	REGISTER_COMMAND(ASpit, xademoquit);
	REGISTER_COMMAND(ASpit, xaexittomain);
}
Exemplo n.º 23
0
IGameRef CGameStartup::Init(SSystemInitParams &startupParams)
{
	MEMSTAT_CONTEXT(EMemStatContextTypes::MSC_Other, 0, "Game startup initialisation");

#if defined(CVARS_WHITELIST)
	startupParams.pCVarsWhitelist = &g_CVarsWhiteList;
#endif // defined(CVARS_WHITELIST)
	startupParams.pGameStartup = this;

	if (!InitFramework(startupParams))
	{
		return 0;
	}

	InlineInitializationProcessing("CGameStartup::Init");

  LOADING_TIME_PROFILE_SECTION(m_pFramework->GetISystem());

	ISystem* pSystem = m_pFramework->GetISystem();
	startupParams.pSystem = pSystem;

	const ICmdLineArg* pSvBind = gEnv->pSystem->GetICmdLine()->FindArg(eCLAT_Pre, "sv_bind"); 
	IConsole* pConsole = pSystem->GetIConsole();
	if ((pSvBind != NULL) && (pConsole != NULL))
	{
		string command = pSvBind->GetName() + string(" ") + pSvBind->GetValue();
		pConsole->ExecuteString(command.c_str(), true, false);
	}

#if defined(ENABLE_STATS_AGENT)
	const ICmdLineArg *pPipeArg = pSystem->GetICmdLine()->FindArg(eCLAT_Pre,"lt_pipename");
	CStatsAgent::CreatePipe( pPipeArg );
#endif

	REGISTER_COMMAND("g_loadMod", CGameStartupStatic::RequestLoadMod,VF_NULL,"");
	REGISTER_COMMAND("g_unloadMod", CGameStartupStatic::RequestUnloadMod, VF_NULL, "");

	// load the appropriate game/mod
#if !defined(_RELEASE)
	const ICmdLineArg *pModArg = pSystem->GetICmdLine()->FindArg(eCLAT_Pre,"MOD");
#else
	const ICmdLineArg *pModArg = NULL;
#endif // !defined(_RELEASE)

	InlineInitializationProcessing("CGameStartup::Init LoadLocalizationData");

	IGameRef pOut;
	if (pModArg && (*pModArg->GetValue() != 0) && (pSystem->IsMODValid(pModArg->GetValue())))
	{
		const char* pModName = pModArg->GetValue();
		assert(pModName);

		pOut = Reset(pModName);
	}
	else
	{
		pOut = Reset(GAME_NAME);
	}

	if (!m_pFramework->CompleteInit())
	{
		pOut->Shutdown();
		return 0;
	}

	InlineInitializationProcessing("CGameStartup::Init FrameworkCompleteInit");

	// should be after init game (should be executed even if there is no game)
	if(startupParams.bExecuteCommandLine)
		pSystem->ExecuteCommandLine();

	pSystem->GetISystemEventDispatcher()->RegisterListener(this);

	// Creates and starts the realtime update system listener.
	if (pSystem->IsDevMode())
	{
		CGameRealtimeRemoteUpdateListener::GetGameRealtimeRemoteUpdateListener().Enable(true);
	}


	GCOV_FLUSH;

	if (ISystem *pSystem = gEnv ? GetISystem() : NULL)
	{
		pSystem->RegisterErrorObserver(&m_errorObsever);
		pSystem->RegisterWindowMessageHandler(this);
	}
	else
	{
		CryLogAlways("failed to find ISystem to register error observer");
		assert(0);
	}

	
	InlineInitializationProcessing("CGameStartup::Init End");

#if defined(CRY_UNIT_TESTING)
	// Register All unit tests of this module.
#if defined(_LIB)
	if(gEnv->pSystem)
	{
		CryUnitTest::Test *pTest = CryUnitTest::Test::m_pFirst; 
		for (; pTest != 0; pTest = pTest->m_pNext)
		{
			CryUnitTest::IUnitTestManager *pTestManager = gEnv->pSystem->GetITestSystem()->GetIUnitTestManager();
			if (pTestManager)
			{
				pTest->m_unitTestInfo.module = "StaticBinary";
				pTestManager->CreateTest( pTest->m_unitTestInfo );
			}
		}
	}
#endif

	// run unit tests
	CryUnitTest::IUnitTestManager *pTestManager =  (gEnv && gEnv->pSystem) ? gEnv->pSystem->GetITestSystem()->GetIUnitTestManager() : NULL;
	if (pTestManager)
	{
		const ICmdLineArg* pSkipUnitTest = gEnv->pSystem->GetICmdLine()->FindArg(eCLAT_Pre, "skip_unit_tests"); 
		if(pSkipUnitTest == NULL)
		{
			const ICmdLineArg* pUseUnitTestExcelReporter = gEnv->pSystem->GetICmdLine()->FindArg(eCLAT_Pre, "use_unit_test_excel_reporter"); 
			if(pUseUnitTestExcelReporter)
			{
				gEnv->pSystem->GetITestSystem()->GetIUnitTestManager()->RunAllTests(CryUnitTest::ExcelReporter);
			}
			else // default is the minimal reporter
			{
				gEnv->pSystem->GetITestSystem()->GetIUnitTestManager()->RunAllTests(CryUnitTest::MinimalReporter);
			}
		}
	}
#endif // CRY_UNIT_TESTING
	
	assert(gEnv);
	PREFAST_ASSUME(gEnv);
	
	GetISystem()->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_RANDOM_SEED, (UINT_PTR)gEnv->pTimer->GetAsyncTime().GetMicroSecondsAsInt64(), 0);
	return pOut;
}
Exemplo n.º 24
0
static void register_tcl_commands(Tcl_Interp* interp) {
  /* in cells.cpp */
  REGISTER_COMMAND("sort_particles", tclcommand_sort_particles);
  REGISTER_COMMAND("cellsystem", tclcommand_cellsystem);
  /* in integrate.cpp */
  REGISTER_COMMAND("invalidate_system", tclcommand_invalidate_system);
  REGISTER_COMMAND("integrate", tclcommand_integrate);
  /* in global.cpp */
  REGISTER_COMMAND("setmd", tclcommand_setmd);
  /* in grid.cpp */
  REGISTER_COMMAND("change_volume", tclcommand_change_volume);
  /* in config_tcl.cpp */
  REGISTER_COMMAND("code_info", tclcommand_code_info);
  /* in interaction_data.cpp */
  REGISTER_COMMAND("inter",tclcommand_inter);
  /* in particle_data.cpp */
  REGISTER_COMMAND("part",tclcommand_part);
  /* in file binaryfile.cpp */
  REGISTER_COMMAND("writemd", tclcommand_writemd);
  REGISTER_COMMAND("readmd", tclcommand_readmd);
  /* in file statistics.cpp */
  REGISTER_COMMAND("analyze", tclcommand_analyze);
  /* in file polymer.cpp */
  REGISTER_COMMAND("polymer", tclcommand_polymer);
  REGISTER_COMMAND("counterions", tclcommand_counterions);
  REGISTER_COMMAND("salt", tclcommand_salt);
  REGISTER_COMMAND("velocities", tclcommand_velocities);
  REGISTER_COMMAND("maxwell_velocities", tclcommand_maxwell_velocities);
  REGISTER_COMMAND("crosslink", tclcommand_crosslink);
  REGISTER_COMMAND("diamond", tclcommand_diamond);
  REGISTER_COMMAND("icosaeder", tclcommand_icosaeder);
  /* in file imd.cpp */
  REGISTER_COMMAND("imd", tclcommand_imd);
  /* in file random.cpp */
  REGISTER_COMMAND("t_random", tclcommand_t_random);
  REGISTER_COMMAND("bit_random", tclcommand_bit_random);
  /* in file blockfile_tcl.cpp */
  REGISTER_COMMAND("blockfile", tclcommand_blockfile);
  /* in constraint.cpp */
  REGISTER_COMMAND("constraint", tclcommand_constraint);
  /* in external_potential.hpp */
  REGISTER_COMMAND("external_potential", tclcommand_external_potential);
  /* in uwerr.c */
  REGISTER_COMMAND("uwerr", tclcommand_uwerr);
  /* in nemd.cpp */
  REGISTER_COMMAND("nemd", tclcommand_nemd);
  /* in thermostat.cpp */
  REGISTER_COMMAND("thermostat", tclcommand_thermostat);
  /* in bin.cpp */
  REGISTER_COMMAND("bin", tclcommand_bin);
  /* in ghmc.cpp */
  REGISTER_COMMAND("ghmc", tclcommand_ghmc);
  REGISTER_COMMAND("save_state", tclcommand_save_state);
  REGISTER_COMMAND("load_state", tclcommand_load_state);
  /* in lb.cpp */

  REGISTER_COMMAND("lbfluid", tclcommand_lbfluid);
  REGISTER_COMMAND("lbnode", tclcommand_lbnode);
  REGISTER_COMMAND("lbboundary", tclcommand_lbboundary);
  /* here */
  REGISTER_COMMAND("replacestdchannel", tclcommand_replacestdchannel);
  /* in iccp3m.hpp */
  REGISTER_COMMAND("observable", tclcommand_observable);
  /* in statistics_obsrvable.hpp */
  REGISTER_COMMAND("correlation", tclcommand_correlation);
  /* in statistics_correlation.hpp */
#ifdef ELECTROSTATICS
#ifdef P3M
  REGISTER_COMMAND("iccp3m", tclcommand_iccp3m);
#endif
  REGISTER_COMMAND("efield_caps", tclcommand_print_efield_capacitors);
#endif
#ifdef METADYNAMICS
  /* in metadynamics.cpp */
  REGISTER_COMMAND("metadynamics", tclcommand_metadynamics);
#endif
#ifdef LB_GPU
  /* in lbgpu_cfile.cpp */
  REGISTER_COMMAND("lbnode_extforce", tclcommand_lbnode_extforce_gpu);
#endif
#ifdef CUDA
  REGISTER_COMMAND("cuda", tclcommand_cuda);
#endif
  /* from collision.cpp */
#ifdef COLLISION_DETECTION
  REGISTER_COMMAND("on_collision", tclcommand_on_collision);
#endif
#ifdef CATALYTIC_REACTIONS
  REGISTER_COMMAND("reaction", tclcommand_reaction);
#endif
  REGISTER_COMMAND("kill_particle_motion", tclcommand_kill_particle_motion);
  REGISTER_COMMAND("kill_particle_forces", tclcommand_kill_particle_forces);
  REGISTER_COMMAND("system_CMS", tclcommand_system_CMS);
  REGISTER_COMMAND("system_CMS_velocity", tclcommand_system_CMS_velocity);
  REGISTER_COMMAND("galilei_transform", tclcommand_galilei_transform);
  REGISTER_COMMAND("time_integration", tclcommand_time_integration);
  REGISTER_COMMAND("electrokinetics", tclcommand_electrokinetics);
#ifdef CUDA
  REGISTER_COMMAND("harmonic_well", tclcommand_HarmonicWell);
#endif
}
Exemplo n.º 25
0
BSpit::BSpit(MohawkEngine_Riven *vm) :
		DomeSpit(vm, kStackBspit, "bSliders.190", "bSliderBG.190") {

	REGISTER_COMMAND(BSpit, xblabopenbook);
	REGISTER_COMMAND(BSpit, xblabbookprevpage);
	REGISTER_COMMAND(BSpit, xblabbooknextpage);
	REGISTER_COMMAND(BSpit, xsoundplug);
	REGISTER_COMMAND(BSpit, xbchangeboiler);
	REGISTER_COMMAND(BSpit, xbupdateboiler);
	REGISTER_COMMAND(BSpit, xbsettrap);
	REGISTER_COMMAND(BSpit, xbcheckcatch);
	REGISTER_COMMAND(BSpit, xbait);
	REGISTER_COMMAND(BSpit, xbfreeytram);
	REGISTER_COMMAND(BSpit, xbaitplate);
	REGISTER_COMMAND(BSpit, xbisland190_opencard);
	REGISTER_COMMAND(BSpit, xbisland190_resetsliders);
	REGISTER_COMMAND(BSpit, xbisland190_slidermd);
	REGISTER_COMMAND(BSpit, xbisland190_slidermw);
	REGISTER_COMMAND(BSpit, xbscpbtn);
	REGISTER_COMMAND(BSpit, xbisland_domecheck);
	REGISTER_COMMAND(BSpit, xvalvecontrol);
	REGISTER_COMMAND(BSpit, xbchipper);
}
Exemplo n.º 26
0
void CScriptbind_Console::RegisterCommand(mono::string cmd, mono::string desc, EVarFlags flags)
{
	REGISTER_COMMAND(ToCryString(cmd), OnMonoCmd, flags, ToCryString(desc));
}
Exemplo n.º 27
0
void CVar::Init( struct IConsole *pConsole )
{
	assert(gEnv->pConsole);
	PREFAST_ASSUME(gEnv->pConsole);

	REGISTER_COMMAND("es_dump_entities", (ConsoleCommandFunc)DumpEntities, 0, "Dumps current entities and their states!");
	REGISTER_COMMAND("es_dump_entity_classes_in_use", (ConsoleCommandFunc)DumpEntityClassesInUse, 0, "Dumps all used entity classes");
	REGISTER_COMMAND("es_compile_area_grid", (ConsoleCommandFunc)CompileAreaGrid, 0, "Trigger a recompile of the area grid");
	REGISTER_COMMAND("es_dump_bookmarks", (ConsoleCommandFunc)DumpEntityBookmarks, 0, "Dumps information about all bookmarked entities");
	REGISTER_COMMAND("es_AudioListenerOffset", (ConsoleCommandFunc)SetAudioListenerOffsets, 0,
		"Sets by how much the audio listener offsets its position and rotation in regards to its entity.\n"
		"Usage: es_AudioListenerOffset PosX PosY PosZ RotX RotY RotZ\n");

	REGISTER_CVAR( es_SortUpdatesByClass, 0, 0, "Sort entity updates by class (possible optimization)" );
	pDebug = REGISTER_INT("es_debug",0,VF_CHEAT,
		"Enable entity debugging info\n"
		"Usage: es_debug [0/1]\n"
		"Default is 0 (on).");
	pCharacterIK = REGISTER_INT("p_CharacterIK",1,VF_CHEAT,
		"Toggles character IK.\n"
		"Usage: p_characterik [0/1]\n"
		"Default is 1 (on). Set to 0 to disable inverse kinematics.");	
	pEntityBBoxes = REGISTER_INT("es_bboxes",0,VF_CHEAT,
		"Toggles entity bounding boxes.\n"
		"Usage: es_bboxes [0/1]\n"
		"Default is 0 (off). Set to 1 to display bounding boxes.");
	pEntityHelpers = REGISTER_INT("es_helpers",0,VF_CHEAT,
		"Toggles helpers.\n"
		"Usage: es_helpers [0/1]\n"
		"Default is 0 (off). Set to 1 to display entity helpers.");
	pProfileEntities = REGISTER_INT("es_profileentities",0,VF_CHEAT,
		"Usage: es_profileentities 1,2,3\n"
		"Default is 0 (off).");
/*	pUpdateInvisibleCharacter = REGISTER_INT("es_UpdateInvisibleCharacter",0,VF_CHEAT,
		"Usage: \n"
		"Default is 0 (off).");
	pUpdateBonePositions = REGISTER_INT("es_UpdateBonePositions",1,VF_CHEAT,
		"Usage: \n"
		"Default is 1 (on).");
*/	pUpdateScript = REGISTER_INT("es_UpdateScript",1,VF_CHEAT,
		"Usage: es_UpdateScript [0/1]\n"
		"Default is 1 (on).");
	pUpdatePhysics = REGISTER_INT("es_UpdatePhysics",1,VF_CHEAT,
		"Toggles updating of entity physics.\n"
		"Usage: es_UpdatePhysics [0/1]\n"
		"Default is 1 (on). Set to 0 to prevent entity physics from updating.");
	pUpdateAI = REGISTER_INT("es_UpdateAI",1,VF_CHEAT,
		"Toggles updating of AI entities.\n"
		"Usage: es_UpdateAI [0/1]\n"
		"Default is 1 (on). Set to 0 to prevent AI entities from updating.");
	pUpdateEntities = REGISTER_INT("es_UpdateEntities",1,VF_CHEAT,
		"Toggles entity updating.\n"
		"Usage: es_UpdateEntities [0/1]\n"
		"Default is 1 (on). Set to 0 to prevent all entities from updating.");
	pUpdateCollision= REGISTER_INT("es_UpdateCollision",1,VF_CHEAT,
		"Toggles updating of entity collisions.\n"
		"Usage: es_UpdateCollision [0/1]\n"
		"Default is 1 (on). Set to 0 to disable entity collision updating.");
	pUpdateContainer= REGISTER_INT("es_UpdateContainer",1,VF_CHEAT,
		"Usage: es_UpdateContainer [0/1]\n"
		"Default is 1 (on).");
	pUpdateTimer = REGISTER_INT("es_UpdateTimer",1,VF_CHEAT,
		"Usage: es_UpdateTimer [0/1]\n"
		"Default is 1 (on).");
	pUpdateCollisionScript = REGISTER_INT("es_UpdateCollisionScript",1,VF_CHEAT,
		"Usage: es_UpdateCollisionScript [0/1]\n"
		"Default is 1 (on).");
	pVisCheckForUpdate = REGISTER_INT("es_VisCheckForUpdate",1,VF_CHEAT,
		"Usage: es_VisCheckForUpdate [0/1]\n"
		"Default is 1 (on).");
	pMinImpulseVel = REGISTER_FLOAT("es_MinImpulseVel",0.0f,VF_CHEAT,
		"Usage: es_MinImpulseVel 0.0");
	pImpulseScale = REGISTER_FLOAT("es_ImpulseScale",0.0f,VF_CHEAT,
		"Usage: es_ImpulseScale 0.0");
	pMaxImpulseAdjMass = REGISTER_FLOAT("es_MaxImpulseAdjMass",2000.0f,VF_CHEAT,
		"Usage: es_MaxImpulseAdjMass 2000.0");
	pDebrisLifetimeScale = REGISTER_FLOAT("es_DebrisLifetimeScale",1.0f,0,
		"Usage: es_DebrisLifetimeScale 1.0");
	pSplashThreshold = REGISTER_FLOAT("es_SplashThreshold",1.0f,VF_CHEAT,
		"minimum instantaneous water resistance that is detected as a splash"
		"Usage: es_SplashThreshold 200.0");
	pSplashTimeout = REGISTER_FLOAT("es_SplashTimeout",3.0f,VF_CHEAT,
		"minimum time interval between consecutive splashes"
		"Usage: es_SplashTimeout 3.0");
	pHitCharacters = REGISTER_INT("es_HitCharacters",1,0,
		"specifies whether alive characters are affected by bullet hits (0 or 1)");
	pHitDeadBodies = REGISTER_INT("es_HitDeadBodies",1,0,
		"specifies whether dead bodies are affected by bullet hits (0 or 1)");
	pCharZOffsetSpeed = REGISTER_FLOAT("es_CharZOffsetSpeed",2.0f,VF_DUMPTODISK,
		"sets the character Z-offset change speed (in m/s), used for IK");

	pNotSeenTimeout = REGISTER_INT("es_not_seen_timeout", 30, VF_DUMPTODISK,
		"number of seconds after which to cleanup temporary render buffers in entity");
	pDebugNotSeenTimeout = REGISTER_INT("es_debug_not_seen_timeout", 0, VF_DUMPTODISK,
		"if true, log messages when entities undergo not seen timeout");

	pEnableFullScriptSave = REGISTER_INT("es_enable_full_script_save",0,
		VF_DUMPTODISK,"Enable (experimental) full script save functionality");
	
	pLogCollisions = REGISTER_INT("es_log_collisions",0,0,"Enables collision events logging" );
	REGISTER_CVAR(es_DebugTimers,0,VF_CHEAT,
		"This is for profiling and debugging (for game coders and level designer)\n"
		"By enabling this you get a lot of console printouts that show all entities that receive OnTimer\n"
		"events - it's good to minimize the call count. Certain entities might require this feature and\n"
		"using less active entities can often be defined by the level designer.\n"
		"Usage: es_DebugTimers 0/1");
	REGISTER_CVAR(es_DebugFindEntity,0,VF_CHEAT,"" );
	REGISTER_CVAR(es_DebugEvents,0,VF_CHEAT,"Enables logging of entity events" );
	REGISTER_CVAR(es_DisableTriggers,0,0,"Disable enter/leave events for proximity and area triggers");
	REGISTER_CVAR(es_DrawProximityTriggers,0,0,
		"Shows Proximity Triggers.\n"
		"Usage: es_DrawProximityTriggers [0-255].  The parameter sets the transparency (alpha) level.\n"
		"Value 1 will be changed to 70.\n"
		"Default is 0 (off)\n");

	REGISTER_CVAR(es_DebugEntityUsage,0,0,
		"Draws information to the screen to show how entities are being used, per class, including total, active and hidden counts and memory usage"
		"\nUsage: es_DebugEntityUsage update_rate"
		"\nupdate_rate - Time in ms to refresh memory usage calculation or 0 to disable");
	REGISTER_CVAR(es_DebugEntityUsageFilter,"",0,"Filter entity usage debugging to classes which have this string in their name");

	REGISTER_CVAR(es_EnablePoolUse,-1,0,
		"Force toggle the use of entity pools on/off.\n"
		"Usage: es_EnablePoolUse 1\n"
		"Default is -1, or normal behavior. 0 forces system off. 1 forces system on.");

	REGISTER_CVAR(es_DebugPool,0,0,"Enable debug drawing of entity pools");
	REGISTER_CVAR(es_TestPoolSignatures,0,VF_CHEAT,"Enable signature testing on entity classes the first time they're prepared from an entity pool");
	REGISTER_CVAR(es_DebugPoolFilter,"",0,"Filter entity pool debugging for just this pool and draw more info about it");

	REGISTER_CVAR(es_LayerSaveLoadSerialization, 0, VF_CHEAT, 
		"Switches layer entity serialization: \n" 
		"0 - serialize all \n"
		"1 - automatically ignore entities on disabled layers \n"
		"2 - only ignore entities on non-save layers.");
	REGISTER_CVAR(es_LayerDebugInfo, 0, VF_CHEAT, 
		"Render debug info on active layers: \n"
		"0 - inactive \n"
		"1 - active brush layers \n"
		"2 - all layer info \n"
		"3 - all layer and all layer pak info");
	REGISTER_CVAR(es_SaveLoadUseLUANoSaveFlag, 0, VF_CHEAT, "Save&Load optimization : use lua flag to not serialize entities, for example rigid bodies.");
	
	REGISTER_CVAR(es_ClearPoolBookmarksOnLayerUnload, 1, VF_CHEAT, "Clear pool bookmarks when a layer is unloaded (saves memory and makes smaller saves)");
	pUpdateType = REGISTER_INT_CB("es_updateType", CComponentEventDistributer::EEventUpdatePolicy_UseDistributer, VF_CHEAT, "Defines how we update type for the entities", OnUpdateTypeChange);

	pDrawAreas = REGISTER_INT("es_DrawAreas",0,VF_CHEAT,"Enables drawing of Areas" );
	pDrawAreaGrid = REGISTER_INT("es_DrawAreaGrid",0,VF_CHEAT,"Enables drawing of Area Grid" );
	pDrawAreaDebug = REGISTER_INT("es_DrawAreaDebug",0,VF_CHEAT,"Enables debug drawing of Areas, set 2 for log details" );
	pDrawAudioProxyZRay = REGISTER_INT("es_DrawAudioProxyZRay",0,VF_CHEAT,"Enables drawing of Z ray on check for Z visibility" );

	REGISTER_CVAR(es_UsePhysVisibilityChecks, 1, 0,
		"Activates physics quality degradation and forceful sleeping for invisible and faraway entities" );
	REGISTER_CVAR(es_MaxPhysDist, 300.0f, 0,
		"Physical entities farther from the camera than this are forcefully deactivated" );
	REGISTER_CVAR(es_MaxPhysDistCloth, 300.0f, 0,
		"Cloth entities farther from the camera than this are forcefully deactivated" );
	REGISTER_CVAR(es_MaxPhysDistInvisible, 40.0f, 0,
		"Invisible physical entities farther from the camera than this are forcefully deactivated" );
	REGISTER_CVAR(es_FarPhysTimeout, 4.0f, 0,
		"Timeout for faraway physics forceful deactivation" );

  pMotionBlur = gEnv->pConsole->GetCVar("r_MotionBlur");
	pSysSpecLight = gEnv->pConsole->GetCVar("sys_spec_light");
	if (pSysSpecLight && gEnv->IsEditor())
		pSysSpecLight->SetOnChangeCallback( OnSysSpecLightChange );

 	REGISTER_CVAR(es_debugEntityLifetime,0,0,
		"Debug entities creation and deletion time" );

	REGISTER_COMMAND("es_debugAnim", (ConsoleCommandFunc)EnableDebugAnimText, 0, "Debug entity animation (toggle on off)");

  REGISTER_CVAR(es_EntityUpdatePosDelta, 0.1f, 0,
    "Indicates the position delta by which an entity must move before the AreaManager updates position relevant data.\n"
    "Default: 0.1 (10 cm)");

	REGISTER_CVAR(es_debugDrawEntityIDs, 0, VF_CHEAT,
		"Displays the EntityId of all entities.\n"
		"Default is 0 (off), any other number enables it.\n"
		"Note: es_debug must be set to 1 also (or else the EntityId won't be displayed)");
}
Exemplo n.º 28
0
IGameRef CGameStartup::Init(SSystemInitParams &startupParams)
{
	MEMSTAT_CONTEXT(EMemStatContextTypes::MSC_Other, 0, "Game startup initialization");

	LOADING("game_startup");

	if (!InitFramework(startupParams))
	{
		return 0;
	}

	// Configuration for this game
	ICVar *pCVar = gEnv->pConsole->GetCVar("ai_CompatibilityMode");
	if (pCVar)
		pCVar->Set("crysis");

  LOADING_TIME_PROFILE_SECTION(m_pFramework->GetISystem());

	ISystem* pSystem = m_pFramework->GetISystem();
	IConsole* pConsole = gEnv->pConsole;
	startupParams.pSystem = pSystem;

#if defined(ENABLE_STATS_AGENT)
	const ICmdLineArg *pPipeArg = pSystem->GetICmdLine()->FindArg(eCLAT_Pre,"lt_pipename");
	CStatsAgent::CreatePipe( pPipeArg );
#endif

	PluginManager::InitPluginManager(startupParams);
    PluginManager::InitPluginsBeforeFramework();

	REGISTER_COMMAND("g_loadMod", RequestLoadMod,VF_NULL,"");

	// load the appropriate game/mod
	const ICmdLineArg *pModArg = pSystem->GetICmdLine()->FindArg(eCLAT_Pre,"MOD");

	IGameRef pOut;
	if (pModArg && (*pModArg->GetValue() != 0) && (pSystem->IsMODValid(pModArg->GetValue())))
	{
		const char* pModName = pModArg->GetValue();
		assert(pModName);

		pOut = Reset(pModName);
	}
	else
	{
		pOut = Reset(GAME_NAME);
	}

	// Load all localized strings.
	LoadLocalizationData();

	if (!m_pFramework->CompleteInit())
	{
		pOut->Shutdown();
		return 0;
	}

	LOADING_DONE;

	// should be after init game (should be executed even if there is no game)
	if(startupParams.bExecuteCommandLine)
		pSystem->ExecuteCommandLine();

	pSystem->GetISystemEventDispatcher()->RegisterListener( &g_system_event_listener_game );

	// Creates and starts the realtime update system listener.
	if (pSystem->IsDevMode())
	{
		CGameRealtimeRemoteUpdateListener::GetGameRealtimeRemoteUpdateListener().Enable(true);
	}

	GCOV_FLUSH;

	if (gEnv && GetISystem())
	{
	}
	else
	{
		CryLogAlways("failed to find ISystem to register error observer");
		assert(0);
	}

	PluginManager::InitPluginsLast();
	return pOut;
}
Exemplo n.º 29
0
void CGameAIRecorderCVars::RegisterCommands()
{
	REGISTER_COMMAND("comment", CmdAIRecorderAddComment, 0, "Add a comment to the AI Recorder");
}
Exemplo n.º 30
0
//------------------------------------------------------------------------
CVehicleCVars::CVehicleCVars()
{
	assert (s_pThis == 0);
	s_pThis = this;
  
	IConsole *pConsole = gEnv->pConsole;
	assert(pConsole);

#if ENABLE_VEHICLE_DEBUG
  // debug draw
  REGISTER_STRING("v_debugVehicle", "", 0, "Vehicle entity name to use for debugging output");    
  REGISTER_CVAR_CB(v_draw_components, 0, VF_DUMPTODISK, "Enables/disables display of components and their damage count", OnDebugDrawVarChanged);
  REGISTER_CVAR_CB(v_draw_helpers, 0, 0, "Enables/disables display of vehicle helpers", OnDebugDrawVarChanged);
  REGISTER_CVAR_CB(v_draw_seats, 0, 0, "Enables/disables display of seat positions", OnDebugDrawVarChanged);
  REGISTER_CVAR(v_draw_tm, 0, 0, "Enables/disables drawing of local part matrices");  
  REGISTER_CVAR(v_draw_passengers, 0, VF_CHEAT, "draw passenger TMs set by VehicleSeat");
  REGISTER_CVAR(v_debugdraw, 0, VF_DUMPTODISK, 
    "Displays vehicle status info on HUD\n"
    "Values:\n"
    "1:  common stuff\n"
    "2:  vehicle particles\n"
    "3:  parts\n"
    "4:  views\n"          
    "6:  parts + partIds\n"
    "7:  parts + transformations and bboxes\n"
    "8:  component damage\n"    
    "10: vehicle editor");
	REGISTER_CVAR(v_debug_mem, 0, 0, "display memory statistic for vehicles");

	REGISTER_CVAR_CB(v_debugView, 0, VF_CHEAT|VF_DUMPTODISK, "Activate a 360 degree rotating third person camera instead of the camera usually available on the vehicle class", OnDebugViewVarChanged);  
	REGISTER_CVAR(v_debugViewDetach, 0, VF_CHEAT|VF_DUMPTODISK, "Freeze vehicle camera position, (1) fixed rotation, (2) track the vehicle");
	REGISTER_CVAR(v_debugViewAbove, 0, VF_CHEAT|VF_DUMPTODISK, "Debug camera, looking down on vehicle");
	REGISTER_CVAR(v_debugViewAboveH, 10.f, VF_CHEAT|VF_DUMPTODISK, "Debug camera, looking down on vehicle, height ");
	REGISTER_CVAR(v_debugCollisionDamage, 0, VF_CHEAT, "Enable debug output for vehicle collisions");  

	REGISTER_CVAR(v_debug_flip_over, 0, VF_CHEAT, "flip over the current vehicle that the player is driving");
	REGISTER_CVAR(v_debug_reorient, 0, VF_CHEAT, "reset the orientation of the vehicle that the player is driving so that it is upright again");

	REGISTER_COMMAND("v_dump_classes", CVehicleSystem::DumpClasses, 0, "Outputs a list of vehicle classes in use");
#endif
      
  // dev vars
  REGISTER_CVAR(v_lights, 2, 0, "Controls vehicle lights.\n"
		"0: disable all lights\n"
		"1: enable lights only for local player\n"
		"2: enable all lights");
  REGISTER_CVAR(v_lights_enable_always, 0, VF_CHEAT, "Vehicle lights are always on (debugging)");    
  REGISTER_CVAR(v_autoDisable, 1, VF_CHEAT, "Enables/disables vehicle autodisabling");
  REGISTER_CVAR(v_set_passenger_tm, 1, VF_CHEAT, "enable/disable passenger entity tm update"); 
  REGISTER_CVAR(v_disable_hull, 0, 0, "Disable hull proxies");  
  REGISTER_CVAR(v_treadUpdateTime, 0, 0, "delta time for tread UV update, 0 means always update");    
  REGISTER_CVAR(v_show_all, 0, VF_CHEAT, "");  
  REGISTER_CVAR(v_transitionAnimations, 1, VF_CHEAT, "Enables enter/exit transition animations for vehicles");
	REGISTER_CVAR(v_playerTransitions, 1, VF_CHEAT, "Enables enter/exit transition animations for vehicles");
  REGISTER_CVAR(v_ragdollPassengers, 0, VF_CHEAT, "Forces vehicle passenger to detach and ragdoll when they die inside of a vehicle");
  REGISTER_CVAR(v_goliathMode, 0, VF_CHEAT, "Makes all vehicles invincible");  
	REGISTER_CVAR(v_enableMannequin, 1, VF_CHEAT, "Enables enter/exit transition animations for vehicles");

  // #AfroStalin . This fix physics lags in multiplayer. Use this dll in GameServer and Clients.
  REGISTER_CVAR(v_serverControlled, 0, VF_CHEAT|VF_REQUIRE_LEVEL_RELOAD, "Makes the vehicles server authoritative, clients only send inputs to the server who then drives the vehicles");
  //
  
  REGISTER_CVAR(v_clientPredict, 1, VF_CHEAT, "Enable client-side prediction on vehicle movement");
  REGISTER_CVAR(v_clientPredictSmoothing, 1, VF_CHEAT, "Enable client-side prediction smoothing on vehicle movement");
  REGISTER_CVAR(v_testClientPredict, 0, VF_CHEAT, "Test client-side prediction on a listen server with no clients, the value represents the number of frames to rewind and replay");
  REGISTER_CVAR(v_clientPredictSmoothingConst, 8.0f, VF_CHEAT, "The amount of smoothing to use, lower values result in smoothing looking movement but more lag behind the true position");
  REGISTER_CVAR(v_clientPredictAdditionalTime, 0.033f, VF_CHEAT, "Additional time offset to calibrate client prediction, will be added to ping and p_net_interp cvar");
  REGISTER_CVAR(v_clientPredictMaxTime, 0.5f, VF_CHEAT, "The maximum time the client can predict ahead of the server position (should be roughly equal to the maximum ping we expect in the real world)");

  // for tweaking  
  REGISTER_CVAR(v_slipSlopeFront, 0.f, VF_CHEAT, "coefficient for slip friction slope calculation (front wheels)");
  REGISTER_CVAR(v_slipSlopeRear, 0.f, VF_CHEAT, "coefficient for slip friction slope calculation (rear wheels)");  
  REGISTER_CVAR(v_slipFrictionModFront, 0.f, VF_CHEAT, "if non-zero, used as slip friction modifier (front wheels)");
  REGISTER_CVAR(v_slipFrictionModRear, 0.f, VF_CHEAT, "if non-zero, used as slip friction modifier (rear wheels)");

  REGISTER_CVAR(v_FlippedExplosionTimeToExplode, 20.f, VF_CHEAT, "The number of seconds to wait after a vehicle is flipped to attempt exploding");
  REGISTER_CVAR(v_FlippedExplosionPlayerMinDistance, 25.f, VF_CHEAT, "If a player is within this distance then don't explode yet");
  REGISTER_CVAR(v_FlippedExplosionRetryTimeMS, 10000, VF_CHEAT, "If a nearby player blocked explosion then try again after this time period");

  
  REGISTER_COMMAND("v_reload_system", "VehicleSystem.ReloadVehicleSystem()", 0, "Reloads VehicleSystem script");  
  REGISTER_COMMAND("v_exit_player", CmdExitPlayer, VF_CHEAT, "Makes the local player exit his current vehicle.");
  
	REGISTER_CVAR(v_disableEntry, 0, 0, "Don't allow players to enter vehicles");
	
  REGISTER_CVAR(v_vehicle_quality, 4, 0, "Geometry/Physics quality (1-lowspec, 4-highspec)");
  REGISTER_CVAR_CB(v_driverControlledMountedGuns, 1, VF_CHEAT, "Specifies if the driver can control the vehicles mounted gun when driving without gunner.", OnDriverControlledGunsChanged);
  REGISTER_CVAR(v_independentMountedGuns, 1, 0, "Whether mounted gunners operate their turret independently from the parent vehicle");
	
	REGISTER_CVAR(v_debugSuspensionIK, 0, 0, "Debug draw the suspension ik");
}