linux fixes
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,10 @@ namespace Game
|
||||
NetworkManager_Cleanup();
|
||||
|
||||
var networkSettings = GameSettings.Load<NetworkSettings>();
|
||||
networkSettings.Address = "any";
|
||||
networkSettings.Port = DefaultServerPort;
|
||||
GameSettings.LoadAsset<NetworkSettings>().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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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>())
|
||||
{
|
||||
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)
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user