MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / Command

Method Command

neo/framework/CVarSystem.cpp:738–759  ·  view source on GitHub ↗

============ idCVarSystemLocal::Command ============ */

Source from the content-addressed store, hash-verified

736============
737*/
738bool idCVarSystemLocal::Command( const idCmdArgs &args ) {
739 idInternalCVar *internal;
740
741 internal = FindInternal( args.Argv( 0 ) );
742
743 if ( internal == NULL ) {
744 return false;
745 }
746
747 if ( args.Argc() == 1 ) {
748 // print the variable
749 common->Printf( "\"%s\" is:\"%s\"" S_COLOR_WHITE " default:\"%s\"\n",
750 internal->nameString.c_str(), internal->valueString.c_str(), internal->resetString.c_str() );
751 if ( idStr::Length( internal->GetDescription() ) > 0 ) {
752 common->Printf( S_COLOR_WHITE "%s\n", internal->GetDescription() );
753 }
754 } else {
755 // set the value
756 internal->Set( args.Args(), false, false );
757 }
758 return true;
759}
760
761/*
762============

Callers 1

Calls 7

ArgvMethod · 0.80
ArgcMethod · 0.80
ArgsMethod · 0.80
PrintfMethod · 0.45
c_strMethod · 0.45
GetDescriptionMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected