From e93e616a978250d63c7fb78afc25c650dd1368f1 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Sun, 22 May 2022 21:49:13 +0300 Subject: [PATCH] gameplay globals cleanup --- Source/Game/Console/EngineSubsystem.cs | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/Source/Game/Console/EngineSubsystem.cs b/Source/Game/Console/EngineSubsystem.cs index 1ba1ba5..493e5fb 100644 --- a/Source/Game/Console/EngineSubsystem.cs +++ b/Source/Game/Console/EngineSubsystem.cs @@ -198,15 +198,8 @@ namespace Game string workDir = Directory.GetCurrentDirectory(); string matBasePath = Path.Combine(workDir, "Content"); string assetPath = Path.Combine(matBasePath, "GameplayGlobals.flax"); - //40caea634c3e619b7c35588f1cbdb967 - GameplayGlobals globals; - globals = Content.GetAsset(assetPath) as GameplayGlobals; - if (globals == null) - globals = Content.Load(assetPath); - - //globals = Content.GetAsset(assetPath) as GameplayGlobals; - //GameplayGlobals globals = Content..GetAsset(new Guid("40caea634c3e619b7c35588f1cbdb967")) as GameplayGlobals; + GameplayGlobals globals = Content.Load(assetPath); return ((bool)globals.GetValue("Scene Lighting") ? "1" : "0"); } @@ -215,12 +208,8 @@ namespace Game string workDir = Directory.GetCurrentDirectory(); string matBasePath = Path.Combine(workDir, "Content"); string assetPath = Path.Combine(matBasePath, "GameplayGlobals.flax"); - //GameplayGlobals globals = Content.GetAsset(assetPath) as GameplayGlobals; - //GameplayGlobals globals = Content.GetAsset(new Guid("40caea634c3e619b7c35588f1cbdb967")) as GameplayGlobals; - GameplayGlobals globals; - globals = Content.GetAsset(assetPath) as GameplayGlobals; - if (globals == null) - globals = Content.Load(assetPath); + + GameplayGlobals globals = Content.Load(assetPath); bool boolValue = false; if (int.TryParse(value, out int intValue))