diff --git a/Content/Materials/SimpleMapMaterial.flax b/Content/Materials/SimpleMapMaterial.flax index a4b3017..452729e 100644 Binary files a/Content/Materials/SimpleMapMaterial.flax and b/Content/Materials/SimpleMapMaterial.flax differ diff --git a/Content/Materials/SkyMaterial.flax b/Content/Materials/SkyMaterial.flax index 1c7bd12..868d390 100644 Binary files a/Content/Materials/SkyMaterial.flax and b/Content/Materials/SkyMaterial.flax differ diff --git a/Content/Materials/ViewModelMaterial.flax b/Content/Materials/ViewModelMaterial.flax index 5209090..98b309c 100644 Binary files a/Content/Materials/ViewModelMaterial.flax and b/Content/Materials/ViewModelMaterial.flax differ diff --git a/Content/Materials/WeaponMaterial.flax b/Content/Materials/WeaponMaterial.flax index 9ea1366..2bfa793 100644 Binary files a/Content/Materials/WeaponMaterial.flax and b/Content/Materials/WeaponMaterial.flax differ diff --git a/Content/Materials/interface/crosshairs/cross.flax b/Content/Materials/interface/crosshairs/cross.flax index 44d7a2a..93ace54 100644 Binary files a/Content/Materials/interface/crosshairs/cross.flax and b/Content/Materials/interface/crosshairs/cross.flax differ diff --git a/Content/Materials/interface/testguimat.flax b/Content/Materials/interface/testguimat.flax index b6398cd..3762f4f 100644 Binary files a/Content/Materials/interface/testguimat.flax and b/Content/Materials/interface/testguimat.flax differ diff --git a/Content/Materials/missing.flax b/Content/Materials/missing.flax index 0ef8578..864439a 100644 Binary files a/Content/Materials/missing.flax and b/Content/Materials/missing.flax differ diff --git a/Content/Materials/testo.flax b/Content/Materials/testo.flax index 2eecd11..53bd68a 100644 Binary files a/Content/Materials/testo.flax and b/Content/Materials/testo.flax differ diff --git a/Content/Scenes/MainScene.scene b/Content/Scenes/MainScene.scene index 01d2065..42593d3 100644 --- a/Content/Scenes/MainScene.scene +++ b/Content/Scenes/MainScene.scene @@ -1,7 +1,7 @@ { "ID": "194e05f445ece24ec5448d886e1334df", "TypeName": "FlaxEngine.SceneAsset", - "EngineBuild": 6335, + "EngineBuild": 6340, "Data": [ { "ID": "194e05f445ece24ec5448d886e1334df", @@ -22,7 +22,7 @@ "TypeName": "Game.Q3MapImporter", "ParentID": "194e05f445ece24ec5448d886e1334df", "V": { - "mapPath": "C:\\dev\\GoakeFlax\\Assets\\Maps\\aerowalk.map", + "mapPath": "Assets/Maps/aerowalk.map", "importLights": true, "BrightnessMultiplier": 0.8227397, "LightRadiusMultiplier": 9.458821 @@ -49,13 +49,13 @@ "ParentID": "ff6b6db54b5aa08e7286ef86246149ef", "Transform": { "Translation": { - "X": 990.0, - "Y": 565.0, + "X": -47.0, + "Y": -54.0, "Z": 0.0 } }, "Data": { - "Text": "3506 tris\n 358 drawcalls\n94fps" + "Text": "16192 tris\n 281 drawcalls\n830fps" } }, { diff --git a/Source/Game/Console/Console.cs b/Source/Game/Console/Console.cs index 6c786f0..c1fc67a 100644 --- a/Source/Game/Console/Console.cs +++ b/Source/Game/Console/Console.cs @@ -134,6 +134,7 @@ namespace Game } // Echoes error text to Console + [DebuggerHidden] public static void PrintError(string text) { instance.PrintError(text); @@ -399,6 +400,8 @@ namespace Game } // Echoes error text to Console + //[DebuggerNonUserCode] + [DebuggerHidden] public void PrintError(string text) { foreach (string line in text.Split('\n')) @@ -408,9 +411,9 @@ namespace Game OnPrint?.Invoke(text); } - if (Debugger.IsAttached) + /*if (Debugger.IsAttached) Debugger.Break(); - else + else*/ throw new Exception(text); } diff --git a/Source/Game/GameMode/GameMode.cs b/Source/Game/GameMode/GameMode.cs index 3f85e47..fd6b59b 100644 --- a/Source/Game/GameMode/GameMode.cs +++ b/Source/Game/GameMode/GameMode.cs @@ -52,6 +52,10 @@ namespace Game NetworkManager_Cleanup(); var networkSettings = GameSettings.Load(); + networkSettings.Address = "any"; + networkSettings.Port = DefaultServerPort; + GameSettings.LoadAsset().SetInstance(networkSettings); + currentGameMode = new GameMode() { ServerAddress = "localhost", @@ -76,7 +80,7 @@ namespace Game failure = NetworkManager.StartServer(); if (failure) { - Console.PrintError("Server startup failed."); + Console.PrintError($"Failed to start the server, unable to bind to address {networkSettings.Address}:{networkSettings.Port}"); return false; } diff --git a/Source/Game/Level/MapParser.cs b/Source/Game/Level/MapParser.cs index f07c6ce..00631b1 100644 --- a/Source/Game/Level/MapParser.cs +++ b/Source/Game/Level/MapParser.cs @@ -154,7 +154,7 @@ namespace Game { if (data[index] != ' ' && data[index] != '\r' && data[index] != '\n') break; - index++; + //index++; } if (index >= data.Length) @@ -213,7 +213,8 @@ namespace Game sb.Append((char)data[index]); } - index++; + //if (data[index] == '\n') + // index++; while (index < data.Length) { diff --git a/Source/Game/Level/Q3MapImporter.cs b/Source/Game/Level/Q3MapImporter.cs index f3d1e77..260fb2c 100644 --- a/Source/Game/Level/Q3MapImporter.cs +++ b/Source/Game/Level/Q3MapImporter.cs @@ -46,7 +46,7 @@ namespace Game //private string mapPath = @"C:\dev\GoakeFlax\Assets\Maps\cube_valve.map"; //private string mapPath = @"C:\dev\GoakeFlax\Assets\Maps\dm4.map"; - public string mapPath = @"C:\dev\Goake\maps\aerowalk\aerowalk.map"; + public string mapPath;// = @"C:\dev\Goake\maps\aerowalk\aerowalk.map"; //private string mapPath = @"C:\dev\GoakeFlax\Assets\Maps\problematic.map"; public bool importLights = false; @@ -350,6 +350,7 @@ namespace Game if (resetLights) { + resetLights = false; if (worldSpawnActor == null || !worldSpawnActor || root == null) { Debug.Log("worldspawn or root is null"); @@ -371,8 +372,6 @@ namespace Game // ParsePlayerSpawn(entity, ref playerSpawnIndex); // break; } - - resetLights = false; } if (dirtyMap) @@ -384,14 +383,13 @@ namespace Game if (dirtyLights) { + dirtyLights = false; foreach (var light in worldSpawnActor.GetChildren()) { light.IsActive = sceneLighting; if (light is PointLight pointLight) pointLight.ShadowsStrength = sceneShadows ? 1.0f : 0.0f; } - - dirtyLights = false; } } @@ -413,7 +411,12 @@ namespace Game private void LoadMap(bool forceLoad) { Stopwatch sw = Stopwatch.StartNew(); - byte[] mapChars = File.ReadAllBytes(mapPath); + + string mapPath_ = mapPath; + if (!File.Exists(mapPath_)) + mapPath_ = Path.Combine(Directory.GetCurrentDirectory(), mapPath_); + + byte[] mapChars = File.ReadAllBytes(mapPath_); root = MapParser.Parse(mapChars); sw.Stop(); //Console.Print("Map parsing time: " + sw.Elapsed.TotalMilliseconds + "ms"); @@ -1103,10 +1106,8 @@ namespace Game } - for (int i=0; i<10000; i++) - { - Debug.Log($"{i} udfghjosa fuhoag guiha7 2382835yayhahn0 generate:{generateSdf}, GI:{Graphics.PostProcessSettings.GlobalIllumination.Mode != GlobalIlluminationMode.None}, {sdfModels.Count}"); - } + //for (int i=0; i<10000; i++) + // Debug.Log($"{i} udfghjosa fuhoag guiha7 2382835yayhahn0 generate:{generateSdf}, GI:{Graphics.PostProcessSettings.GlobalIllumination.Mode != GlobalIlluminationMode.None}, {sdfModels.Count}"); //Debug.Log($"generate:{generateSdf}, GI:{Graphics.PostProcessSettings.GlobalIllumination.Mode != GlobalIlluminationMode.None}, {sdfModels.Count}"); if (generateSdf && globalIllumination /*&& Graphics.PostProcessSettings.GlobalIllumination.Mode != GlobalIlluminationMode.None*/ && sdfModels.Count > 1) diff --git a/Source/GameEditorTarget.Build.cs b/Source/GameEditorTarget.Build.cs index 040bc62..91643ad 100644 --- a/Source/GameEditorTarget.Build.cs +++ b/Source/GameEditorTarget.Build.cs @@ -12,7 +12,7 @@ public class GameEditorTarget : GameProjectEditorTarget base.Init(); Architectures = new TargetArchitecture[] { TargetArchitecture.x64 }; - Platforms = new TargetPlatform[] { TargetPlatform.Windows }; + Platforms = new TargetPlatform[] { TargetPlatform.Windows, TargetPlatform.Linux }; Modules.Add("Game"); //Modules.Add("FidelityFXFSR"); diff --git a/Source/GameTarget.Build.cs b/Source/GameTarget.Build.cs index 859abcf..d7a23e2 100644 --- a/Source/GameTarget.Build.cs +++ b/Source/GameTarget.Build.cs @@ -17,14 +17,15 @@ public class GameTarget : GameProjectTarget Win32ResourceFile = @"C:\dev\GoakeFlax\Source\goake.rc"; IsPreBuilt = false; Architectures = new TargetArchitecture[] { TargetArchitecture.x64 }; - Platforms = new TargetPlatform[] { TargetPlatform.Windows }; + Platforms = new TargetPlatform[] { TargetPlatform.Windows, TargetPlatform.Linux }; - LinkType = TargetLinkType.Monolithic; + //LinkType = TargetLinkType.Monolithic; if (LinkType == TargetLinkType.Monolithic) { - Modules.Add("Main"); - OutputType = TargetOutputType.Executable; + //only for windows? + //Modules.Add("Main"); + //OutputType = TargetOutputType.Executable; } Modules.Add("Game"); @@ -34,7 +35,7 @@ public class GameTarget : GameProjectTarget #endif } - public override string GetOutputFilePath(BuildOptions options, TargetOutputType? outputType = null) + /*public override string GetOutputFilePath(BuildOptions options, TargetOutputType? outputType = null) { if (!Environment.CommandLine.Contains("Cooker")) // Hacky way to detect if this is run during cooking { @@ -46,6 +47,6 @@ public class GameTarget : GameProjectTarget } return base.GetOutputFilePath(options, outputType); - } + }*/ } \ No newline at end of file