cleanup console stuff

This commit is contained in:
2024-04-06 15:16:03 +03:00
parent e7dc19b1a1
commit c17614e393
13 changed files with 270 additions and 370 deletions

View File

@@ -330,10 +330,10 @@ public class Q3MapImporter : Script
#endif
public override void OnStart()
{
sceneLighting = lastSceneLighting = EngineSubsystem.SceneLighting == "1";
sceneShadows = lastSceneShadows = EngineSubsystem.SceneShadows == "1";
staticBatching = lastStaticBatching = EngineSubsystem.StaticBatch == "1";
globalIllumination = EngineSubsystem.GlobalIllumination == "1";
sceneLighting = lastSceneLighting = EngineConsoleCommands.SceneLighting == "1";
sceneShadows = lastSceneShadows = EngineConsoleCommands.SceneShadows == "1";
staticBatching = lastStaticBatching = EngineConsoleCommands.StaticBatch == "1";
globalIllumination = EngineConsoleCommands.GlobalIllumination == "1";
LoadMap(false);
}
@@ -350,25 +350,25 @@ public class Q3MapImporter : Script
private bool globalIllumination = false;
public override void OnUpdate()
{
sceneLighting = EngineSubsystem.SceneLighting == "1";
sceneLighting = EngineConsoleCommands.SceneLighting == "1";
if (lastSceneLighting != sceneLighting)
{
lastSceneLighting = sceneLighting;
dirtyLights = true;
}
sceneShadows = EngineSubsystem.SceneShadows == "1";
sceneShadows = EngineConsoleCommands.SceneShadows == "1";
if (lastSceneShadows != sceneShadows)
{
lastSceneShadows = sceneShadows;
dirtyLights = true;
}
var staticBatching = EngineSubsystem.StaticBatch == "1";
var staticBatching = EngineConsoleCommands.StaticBatch == "1";
if (lastStaticBatching != staticBatching)
{
lastStaticBatching = staticBatching;
StaticBatching = staticBatching;
}
globalIllumination = EngineSubsystem.GlobalIllumination == "1";
globalIllumination = EngineConsoleCommands.GlobalIllumination == "1";
if (lastGlobalIllumination != globalIllumination)
{
lastGlobalIllumination = globalIllumination;