r_lighting and gameplay globals
This commit is contained in:
@@ -472,25 +472,34 @@ namespace Game
|
||||
|
||||
//Console.PrintDebug("Executed '" + execute + "' with params: '" + value + "'");
|
||||
|
||||
if (consoleCommands.TryGetValue(executeLower, out ConsoleCommand cmd))
|
||||
try
|
||||
{
|
||||
string[] values = strs.Skip(1).ToArray();
|
||||
if (values.Length > 0)
|
||||
cmd.Invoke(values);
|
||||
else
|
||||
cmd.Invoke();
|
||||
//Console.Print("Command bound to '" + execute + "' is '" + cmd.method.Name + "'");
|
||||
}
|
||||
else if (consoleVariables.TryGetValue(executeLower, out ConsoleVariable cvar))
|
||||
{
|
||||
if (value != null)
|
||||
cvar.SetValue(value);
|
||||
if (consoleCommands.TryGetValue(executeLower, out ConsoleCommand cmd))
|
||||
{
|
||||
string[] values = strs.Skip(1).ToArray();
|
||||
if (values.Length > 0)
|
||||
cmd.Invoke(values);
|
||||
else
|
||||
cmd.Invoke();
|
||||
//Console.Print("Command bound to '" + execute + "' is '" + cmd.method.Name + "'");
|
||||
}
|
||||
else if (consoleVariables.TryGetValue(executeLower, out ConsoleVariable cvar))
|
||||
{
|
||||
if (value != null)
|
||||
cvar.SetValue(value);
|
||||
|
||||
Console.Print("'" + execute + "' is '" + cvar.GetValueString() + "'");
|
||||
Console.Print("'" + execute + "' is '" + cvar.GetValueString() + "'");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.Print("Unknown command '" + execute + "'");
|
||||
}
|
||||
}
|
||||
else
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.Print("Unknown command '" + execute + "'");
|
||||
var message = e.InnerException != null ? e.InnerException.Message : e.Message;
|
||||
Console.Print("Command failed: " + message);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user